From 0b32a42531e7f3609abe431274e2b4669c0c0b07 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:06:00 -0300 Subject: linkerd: update script fix #3 --- .../applications/networking/cluster/linkerd/update-stable.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkgs/applications/networking/cluster/linkerd/update-stable.sh') diff --git a/pkgs/applications/networking/cluster/linkerd/update-stable.sh b/pkgs/applications/networking/cluster/linkerd/update-stable.sh index 96280b5071606..37314ac1c4601 100755 --- a/pkgs/applications/networking/cluster/linkerd/update-stable.sh +++ b/pkgs/applications/networking/cluster/linkerd/update-stable.sh @@ -1,7 +1,7 @@ #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl gnugrep gnused jq -set -eu -o pipefail +set -x -eu -o pipefail cd $(dirname "$0") @@ -14,7 +14,7 @@ VERSION=$(echo ${TAG} | sed 's/^stable-//') SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/${TAG}.tar.gz) setKV () { - sed -i "s|$1 = \".*\"|$1 = \"$2\"|" ./default.nix + sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix } setKV version ${VERSION} @@ -25,11 +25,11 @@ cd ../../../../../ set +e VENDOR_SHA256=$(nix-build --no-out-link -A linkerd 2>&1 | grep "got:" | cut -d':' -f2 | sed 's| ||g') set -e +cd - > /dev/null if [ -n "${VENDOR_SHA256:-}" ]; then - cd - > /dev/null - setKV vendorSha256 ${VENDOR_SHA256} + setKV vendorSha256 ${VENDOR_SHA256} else - echo "Update failed. VENDOR_SHA256 is empty." - exit 1 + echo "Update failed. VENDOR_SHA256 is empty." + exit 1 fi -- cgit 1.4.1