From fc8e62c908626c27e060d0d440ba3944702bbd06 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Tue, 11 Oct 2022 21:58:57 +0200 Subject: [PATCH] fix: correctly generate src archives [skip ci] --- check_tags.sh | 2 +- update_version.sh | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/check_tags.sh b/check_tags.sh index 3ce4fb9..eaf9d84 100755 --- a/check_tags.sh +++ b/check_tags.sh @@ -330,7 +330,7 @@ else export SHOULD_BUILD_APPIMAGE="no" fi elif [[ "${OS_NAME}" == "osx" ]]; then - if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_ARCH}" == "arm64" ]]; then + if [[ "${VSCODE_ARCH}" == "arm64" ]]; then export SHOULD_BUILD_SRC="yes" fi elif [[ "${OS_NAME}" == "windows" ]]; then diff --git a/update_version.sh b/update_version.sh index a6ded2b..0c43e19 100755 --- a/update_version.sh +++ b/update_version.sh @@ -75,15 +75,20 @@ generateJson() { updateLatestVersion() { echo "Generating ${VERSION_PATH}/latest.json" + # do not update the same version since BUILD_SOURCEVERSION might be different + if [[ -f "versions/${VERSION_PATH}/latest.json" ]]; then + CURRENT_VERSION=$( jq -r '.name' "versions/${VERSION_PATH}/latest.json" ) + + if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" ]]; then + return + fi + fi + + mkdir -p "versions/${VERSION_PATH}" + generateJson - cd versions - - # create/update the latest.json file in the correct location - mkdir -p "${VERSION_PATH}" - echo "${JSON_DATA}" > "${VERSION_PATH}/latest.json" - - cd .. + echo "${JSON_DATA}" > "versions/${VERSION_PATH}/latest.json" } # init versions repo for later commiting + pushing the json file to it