From 7327f9910d8dac9dd7aeaa164e7ba0b6fb512489 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Tue, 16 Aug 2022 14:33:30 +0200 Subject: [PATCH] ci: get MS_TAG from update api (#1196) --- get_repo.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/get_repo.sh b/get_repo.sh index 413fc5b..aea9ec0 100755 --- a/get_repo.sh +++ b/get_repo.sh @@ -1,13 +1,15 @@ #!/bin/bash +set -e + # git workaround if [[ "${CI_BUILD}" != "no" ]]; then git config --global --add safe.directory /__w/vscodium/vscodium fi if [[ -z "${RELEASE_VERSION}" ]]; then - git fetch --all - MS_TAG=$( git tag -l --sort=-version:refname | head -1 ) + UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol) + export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name') date=$( date +%Y%j ) export RELEASE_VERSION="${MS_TAG}.${date: -5}" else