From 3c671a7c09b7caa4bd729d557aa6cb63ef397805 Mon Sep 17 00:00:00 2001 From: DingRui Yang Date: Thu, 2 Mar 2023 21:11:45 +0800 Subject: [PATCH 1/3] Fix miss ${GOARM}" parameter in build-restic.sh Signed-off-by: DingRui Yang --- hack/build-restic.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/build-restic.sh b/hack/build-restic.sh index 5859414fd..3e7f4287f 100755 --- a/hack/build-restic.sh +++ b/hack/build-restic.sh @@ -50,6 +50,10 @@ fi mkdir ${build_path}/restic git clone -b v${RESTIC_VERSION} https://github.com/restic/restic.git ${build_path}/restic pushd ${build_path}/restic -go run build.go --goos "${GOOS}" --goarch "${GOARCH}" --goarm "${GOARM}" -o ${restic_bin} +if [ -z "${GOARM}" ]; then + go run build.go --goos "${GOOS}" --goarch "${GOARCH}" -o ${restic_bin} +else + go run build.go --goos "${GOOS}" --goarch "${GOARCH}" --goarm "${GOARM}" -o ${restic_bin} +fi chmod +x ${restic_bin} popd From c6c6908b1ab770ede9853732ef2751ccab7fb686 Mon Sep 17 00:00:00 2001 From: DingRui Yang Date: Fri, 3 Mar 2023 17:42:58 +0800 Subject: [PATCH 2/3] Update build-restic.sh Signed-off-by: DingRui Yang --- hack/build-restic.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hack/build-restic.sh b/hack/build-restic.sh index 3e7f4287f..5859414fd 100755 --- a/hack/build-restic.sh +++ b/hack/build-restic.sh @@ -50,10 +50,6 @@ fi mkdir ${build_path}/restic git clone -b v${RESTIC_VERSION} https://github.com/restic/restic.git ${build_path}/restic pushd ${build_path}/restic -if [ -z "${GOARM}" ]; then - go run build.go --goos "${GOOS}" --goarch "${GOARCH}" -o ${restic_bin} -else - go run build.go --goos "${GOOS}" --goarch "${GOARCH}" --goarm "${GOARM}" -o ${restic_bin} -fi +go run build.go --goos "${GOOS}" --goarch "${GOARCH}" --goarm "${GOARM}" -o ${restic_bin} chmod +x ${restic_bin} popd From 9d42c1a408c1e1a3accf8757a7d7704fff3b26de Mon Sep 17 00:00:00 2001 From: DingRui Yang Date: Fri, 3 Mar 2023 17:43:46 +0800 Subject: [PATCH 3/3] Update Tiltfile Signed-off-by: DingRui Yang --- Tiltfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiltfile b/Tiltfile index 3ce9aedf7..848f25afc 100644 --- a/Tiltfile +++ b/Tiltfile @@ -103,7 +103,7 @@ local_resource( local_resource( "restic_binary", - cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 RESTIC_VERSION=0.13.1 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', + cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', ) # Note: we need a distro with a bash shell to exec into the Velero container