From befb92ccf5b4267bfc8ce8a431aef19618fba741 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Sat, 13 Mar 2021 00:01:09 +0000 Subject: [PATCH] tektoncd-cli: 0.16.0 -> 0.17.0 (#116036) Co-authored-by: Sandro --- .../cluster/tektoncd-cli/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/cluster/tektoncd-cli/default.nix b/pkgs/applications/networking/cluster/tektoncd-cli/default.nix index 581af59f0c8f..847e3f64ca6b 100644 --- a/pkgs/applications/networking/cluster/tektoncd-cli/default.nix +++ b/pkgs/applications/networking/cluster/tektoncd-cli/default.nix @@ -2,23 +2,20 @@ buildGoModule rec { pname = "tektoncd-cli"; - version = "0.16.0"; + version = "0.17.0"; src = fetchFromGitHub { owner = "tektoncd"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-IY9iJa4HcZ60jDPdP47jjC0FiOJesvf2vEENMAYVd4Q="; + sha256 = "sha256-IyYlmatgcVbUj1WCPAFVOIgn1iHM80P4ie6d1YD3ISM="; }; vendorSha256 = null; - buildFlagsArray = [ - "-ldflags=" - "-s" - "-w" - "-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}" - ]; + preBuild = '' + buildFlagsArray+=("-ldflags" "-s -w -X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}") + ''; nativeBuildInputs = [ installShellFiles ]; @@ -40,6 +37,14 @@ buildGoModule rec { --zsh <($out/bin/tkn completion zsh) ''; + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/tkn --help + $out/bin/tkn version | grep "Client version: ${version}" + runHook postInstallCheck + ''; + meta = with lib; { homepage = "https://tekton.dev"; changelog = "https://github.com/tektoncd/cli/releases/tag/v${version}";