Merge pull request #112755 from 06kellyjac/tektoncd-cli

tektoncd-cli: cleanup
This commit is contained in:
Jörg Thalheim 2021-02-12 20:17:47 +00:00 committed by GitHub
commit 5852a21819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 11 deletions

View File

@ -13,19 +13,26 @@ buildGoModule rec {
vendorSha256 = null; vendorSha256 = null;
doCheck = false; buildFlagsArray = [
"-ldflags="
"-s"
"-w"
"-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}"
];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
buildPhase = '' # third_party/VENDOR-LICENSE breaks build/check as go files are still included
make bin/tkn # docs is a tool for generating docs
excludedPackages = "\\(third_party\\|cmd/docs\\)";
preCheck = ''
# Change the golden files to match our desired version
sed -i "s/dev/${version}/" pkg/cmd/version/testdata/TestGetVersions-*.golden
''; '';
installPhase = '' postInstall = ''
install bin/tkn -Dt $out/bin installManPage docs/man/man1/*
mkdir -p "$out/share/man/man1"
cp docs/man/man1/* "$out/share/man/man1"
installShellCompletion --cmd tkn \ installShellCompletion --cmd tkn \
--bash <($out/bin/tkn completion bash) \ --bash <($out/bin/tkn completion bash) \
@ -34,14 +41,14 @@ buildGoModule rec {
''; '';
meta = with lib; { meta = with lib; {
description = "The Tekton Pipelines cli project provides a CLI for interacting with Tekton";
homepage = "https://tekton.dev"; homepage = "https://tekton.dev";
changelog = "https://github.com/tektoncd/cli/releases/tag/v${version}";
description = "Provides a CLI for interacting with Tekton";
longDescription = '' longDescription = ''
The Tekton Pipelines cli project provides a CLI for interacting with Tekton! The Tekton Pipelines cli project provides a CLI for interacting with Tekton!
For your convenience, it is recommended that you install the Tekton CLI, tkn, together with the core component of Tekton, Tekton Pipelines. For your convenience, it is recommended that you install the Tekton CLI, tkn, together with the core component of Tekton, Tekton Pipelines.
''; '';
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ jk mstrangfeld ]; maintainers = with maintainers; [ jk mstrangfeld vdemeester ];
platforms = platforms.linux ++ platforms.darwin;
}; };
} }