From 4e141a96edcdddad1f5f78bd6b0e17b518d819af Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Thu, 14 Jan 2021 11:20:28 -0600 Subject: [PATCH] snap: tag yq version yq major releases are not backward compatible, install the same major version used in the CI to avoid conflics building the kata components. We should update yq when the CI updates it, not before. fixes #1232 Signed-off-by: Julio Montes --- snap/snapcraft.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 663bb529f7..623be060ce 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -57,15 +57,10 @@ parts: *) echo "unsupported architecture: $(uname -m)"; exit 1;; esac - # Workaround to get latest release from github (to not use github token). - # Get the redirection to latest release on github. - yq_latest_url=$(curl -Ls -o /dev/null -w %{url_effective} "https://${yq_pkg}/releases/latest") - # The redirected url should include the latest release version - # https://github.com/mikefarah/yq/releases/tag/ - yq_version=$(basename "${yq_latest_url}") + yq_version=3.4.1 yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}" - curl -o "${yq_path}" -LSsf ${yq_url} - chmod +x ${yq_path} + curl -o "${yq_path}" -LSsf "${yq_url}" + chmod +x "${yq_path}" kata_dir=gopath/src/github.com/${SNAPCRAFT_PROJECT_NAME}/${SNAPCRAFT_PROJECT_NAME} version="$(${yq_path} r ${kata_dir}/versions.yaml languages.golang.meta.newest-version)"