summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/linkerd
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2021-10-14 15:06:00 -0300
committersuperherointj <5861043+superherointj@users.noreply.github.com>2021-10-14 15:17:41 -0300
commit0b32a42531e7f3609abe431274e2b4669c0c0b07 (patch)
tree9b1dd2d6831ca6ccdc5e46fbb2918d4612528af2 /pkgs/applications/networking/cluster/linkerd
parentf8d898781a7af5378eec09f0ff268badd209f5c1 (diff)
downloadnixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar.gz
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar.bz2
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar.lz
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar.xz
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.tar.zst
nixpkgs-0b32a42531e7f3609abe431274e2b4669c0c0b07.zip
linkerd: update script fix #3
Diffstat (limited to 'pkgs/applications/networking/cluster/linkerd')
-rwxr-xr-xpkgs/applications/networking/cluster/linkerd/update-edge.sh6
-rwxr-xr-xpkgs/applications/networking/cluster/linkerd/update-stable.sh12
2 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/applications/networking/cluster/linkerd/update-edge.sh b/pkgs/applications/networking/cluster/linkerd/update-edge.sh
index 0ad960edebd..8bf49452b3e 100755
--- a/pkgs/applications/networking/cluster/linkerd/update-edge.sh
+++ b/pkgs/applications/networking/cluster/linkerd/update-edge.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/^edge-//')
 SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/${TAG}.tar.gz)
 
 setKV () {
-    sed -i "s|$1 = \".*\"|$1 = \"$2\"|" ./edge.nix
+    sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./edge.nix
 }
 
 setKV version ${VERSION}
@@ -25,9 +25,9 @@ cd ../../../../../
 set +e
 VENDOR_SHA256=$(nix-build --no-out-link -A linkerd_edge 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}
 else
     echo "Update failed. VENDOR_SHA256 is empty."
diff --git a/pkgs/applications/networking/cluster/linkerd/update-stable.sh b/pkgs/applications/networking/cluster/linkerd/update-stable.sh
index 96280b50716..37314ac1c46 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