Merge pull request #180545 from superherointj/package-flyctl-0.0.348

flyctl: 0.0.346 -> 0.0.348
This commit is contained in:
superherointj 2022-07-07 13:11:09 -03:00 committed by GitHub
commit dd28983a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,17 +1,17 @@
{ lib, buildGoModule, fetchFromGitHub, testers, flyctl }:
{ lib, buildGoModule, fetchFromGitHub, testers, flyctl, installShellFiles }:
buildGoModule rec {
pname = "flyctl";
version = "0.0.346";
version = "0.0.348";
src = fetchFromGitHub {
owner = "superfly";
repo = "flyctl";
rev = "v${version}";
sha256 = "sha256-CUv/zF323tplvyAfpTWGALFV3RKpkMmxiXx3gX8ZO3A=";
sha256 = "sha256-Z5WHmwz1ds5xQkc7QrGsUjZu0ug66XNV7KFbzhaP32I=";
};
vendorSha256 = "sha256-x2mJ1FO/a4eMHpEPLGdatUoY+Bt0RGElENJYUEsqcMU=";
vendorSha256 = "sha256-U5f2S5MoCk8PjkVYKlmVQvWb8/Q8n0J9julFz52bOec=";
subPackages = [ "." ];
@ -23,6 +23,8 @@ buildGoModule rec {
"-X github.com/superfly/flyctl/internal/buildinfo.version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
preBuild = ''
go generate ./...
'';
@ -35,6 +37,13 @@ buildGoModule rec {
go test ./... -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=1970-01-01T00:00:00Z'"
'';
postInstall = ''
installShellCompletion --cmd flyctl \
--bash <($out/bin/flyctl completion bash) \
--fish <($out/bin/flyctl completion fish) \
--zsh <($out/bin/flyctl completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = flyctl;
command = "HOME=$(mktemp -d) flyctl version";