Răsfoiți Sursa

fix: correctly generate src archives [skip ci]

Baptiste Augrain 2 ani în urmă
părinte
comite
fc8e62c908
2 a modificat fișierele cu 12 adăugiri și 7 ștergeri
  1. 1 1
      check_tags.sh
  2. 11 6
      update_version.sh

+ 1 - 1
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

+ 11 - 6
update_version.sh

@@ -75,15 +75,20 @@ generateJson() {
 updateLatestVersion() {
   echo "Generating ${VERSION_PATH}/latest.json"
 
-  generateJson
+  # 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" )
 
-  cd versions
+    if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" ]]; then
+      return
+    fi
+  fi
 
-  # create/update the latest.json file in the correct location
-  mkdir -p "${VERSION_PATH}"
-  echo "${JSON_DATA}" > "${VERSION_PATH}/latest.json"
+  mkdir -p "versions/${VERSION_PATH}"
+
+  generateJson
 
-  cd ..
+  echo "${JSON_DATA}" > "versions/${VERSION_PATH}/latest.json"
 }
 
 # init versions repo for later commiting + pushing the json file to it