git.iko.soy/typeable/nixpkgs
on master help sign in
linkerd: update script fix #3
commit0b32a42531e7f3609abe431274e2b4669c0c0b07 authorsuperherointj <5861043+superherointj@users.noreply.github.com> dateThu 14 Oct 2021, 15:06 (5 years ago) parentf8d8987
2 files changed+9−9
pkgs/applications/networking/cluster/linkerd/update-edge.sh+3−3 pkgs/applications/networking/cluster/linkerd/update-stable.sh+6−6
pkgs/applications/networking/cluster/linkerd/update-edge.sh+3−3
@@ -1,7 +1,7 @@
11#!/usr/bin/env nix-shell
22#!nix-shell -i bash -p curl gnugrep gnused jq
33
4−set -eu -o pipefail
4+set -x -eu -o pipefail
55
66cd $(dirname "$0")
77
@@ -14,7 +14,7 @@ VERSION=$(echo ${TAG} | sed 's/^edge-//')
1414SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/${TAG}.tar.gz)
1515
1616setKV () {
17− sed -i "s|$1 = \".*\"|$1 = \"$2\"|" ./edge.nix
17+ sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./edge.nix
1818}
1919
2020setKV version ${VERSION}
@@ -25,9 +25,9 @@ cd ../../../../../
2525set +e
2626VENDOR_SHA256=$(nix-build --no-out-link -A linkerd_edge 2>&1 | grep "got:" | cut -d':' -f2 | sed 's| ||g')
2727set -e
28+cd - > /dev/null
2829
2930if [ -n "${VENDOR_SHA256:-}" ]; then
30− cd - > /dev/null
3131 setKV vendorSha256 ${VENDOR_SHA256}
3232else
3333 echo "Update failed. VENDOR_SHA256 is empty."
pkgs/applications/networking/cluster/linkerd/update-stable.sh+6−6
@@ -1,7 +1,7 @@
11#!/usr/bin/env nix-shell
22#!nix-shell -i bash -p curl gnugrep gnused jq
33
4−set -eu -o pipefail
4+set -x -eu -o pipefail
55
66cd $(dirname "$0")
77
@@ -14,7 +14,7 @@ VERSION=$(echo ${TAG} | sed 's/^stable-//')
1414SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/${TAG}.tar.gz)
1515
1616setKV () {
17− sed -i "s|$1 = \".*\"|$1 = \"$2\"|" ./default.nix
17+ sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
1818}
1919
2020setKV version ${VERSION}
@@ -25,11 +25,11 @@ cd ../../../../../
2525set +e
2626VENDOR_SHA256=$(nix-build --no-out-link -A linkerd 2>&1 | grep "got:" | cut -d':' -f2 | sed 's| ||g')
2727set -e
28+cd - > /dev/null
2829
2930if [ -n "${VENDOR_SHA256:-}" ]; then
30− cd - > /dev/null
31− setKV vendorSha256 ${VENDOR_SHA256}
31+ setKV vendorSha256 ${VENDOR_SHA256}
3232else
33− echo "Update failed. VENDOR_SHA256 is empty."
34− exit 1
33+ echo "Update failed. VENDOR_SHA256 is empty."
34+ exit 1
3535fi