From 2cddda84c507de1cf62ab34648dfb1a109aaa813 Mon Sep 17 00:00:00 2001 From: Ashish Amarnath Date: Thu, 11 Mar 2021 10:11:23 -0800 Subject: [PATCH] Upgrade restic from v0.9.6 to v0.12.0 (#3528) * Upgrade restic from v0.9.6 to v0.12.0 Signed-off-by: Ashish Amarnath * add changelog Signed-off-by: Ashish Amarnath --- Makefile | 2 +- Tiltfile | 2 +- changelogs/unreleased/3528-ashish-amarnath | 1 + hack/download-restic.sh | 12 +++--------- 4 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 changelogs/unreleased/3528-ashish-amarnath diff --git a/Makefile b/Makefile index 861b4403b..17efdd681 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ see: https://velero.io/docs/main/build-from-source/#making-images-and-updating-v endef # The version of restic binary to be downloaded for power architecture -RESTIC_VERSION ?= 0.9.6 +RESTIC_VERSION ?= 0.12.0 CLI_PLATFORMS ?= linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-amd64 linux-ppc64le BUILDX_PLATFORMS ?= $(subst -,/,$(ARCH)) diff --git a/Tiltfile b/Tiltfile index 46a5cadb2..d9c30bd42 100644 --- a/Tiltfile +++ b/Tiltfile @@ -103,7 +103,7 @@ local_resource( local_resource( "restic_binary", - cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=' + local_goos + ' GOARCH=amd64 RESTIC_VERSION=0.9.6 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', + cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=' + local_goos + ' GOARCH=amd64 RESTIC_VERSION=0.12.0 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', ) # Note: we need a distro with a bash shell to exec into the Velero container diff --git a/changelogs/unreleased/3528-ashish-amarnath b/changelogs/unreleased/3528-ashish-amarnath new file mode 100644 index 000000000..559574dcf --- /dev/null +++ b/changelogs/unreleased/3528-ashish-amarnath @@ -0,0 +1 @@ +Upgrade restic from v0.9.6 to v0.12.0. diff --git a/hack/download-restic.sh b/hack/download-restic.sh index bb60268fa..2da59383c 100755 --- a/hack/download-restic.sh +++ b/hack/download-restic.sh @@ -46,14 +46,8 @@ if [[ -z "${RESTIC_VERSION}" ]]; then exit 1 fi -# TODO: when the new restic version is released, make ppc64le to be also downloaded from their github releases. -# This has been merged and will be applied to next release: https://github.com/restic/restic/pull/2342 -if [[ "${GOARCH}" = "ppc64le" ]]; then - curl -s --retry 5 -L https://oplab9.parqtec.unicamp.br/pub/ppc64el/restic/restic-${RESTIC_VERSION} -o ${restic_bin} -else - curl -s -L https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_${GOOS}_${GOARCH}.bz2 -O - bunzip2 restic_${RESTIC_VERSION}_${GOOS}_${GOARCH}.bz2 - mv restic_${RESTIC_VERSION}_${GOOS}_${GOARCH} ${restic_bin} -fi +curl -s -L https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_${GOOS}_${GOARCH}.bz2 -O +bunzip2 restic_${RESTIC_VERSION}_${GOOS}_${GOARCH}.bz2 +mv restic_${RESTIC_VERSION}_${GOOS}_${GOARCH} ${restic_bin} chmod +x ${restic_bin}