Răsfoiți Sursa

Merge branch 'master' into insider

Baptiste Augrain 2 ani în urmă
părinte
comite
2bdecb847c

+ 10 - 13
.github/workflows/insider-linux.yml

@@ -122,27 +122,24 @@ jobs:
   aur:
     needs: build
     runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+        - package_name: vscodium-insiders-bin
+        - package_name: vscodium-insiders
     if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
 
     steps:
       - name: Get version
         env:
           RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
-        run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> $GITHUB_ENV
+        run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> "${GITHUB_ENV}"
 
-      - name: Publish vscodium-insiders-bin
+      - name: Publish ${{ matrix.package_name }}
         uses: zokugun/github-actions-aur-releaser@v1
         with:
-          package_name: vscodium-insiders-bin
-          package_version: ${{ env.PACKAGE_VERSION }}
-          aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
-          aur_username: ${{ secrets.AUR_USERNAME }}
-          aur_email: ${{ secrets.AUR_EMAIL }}
-
-      - name: Publish vscodium-insiders
-        uses: zokugun/github-actions-aur-releaser@v1
-        with:
-          package_name: vscodium-insiders
+          package_name: ${{ matrix.package_name }}
           package_version: ${{ env.PACKAGE_VERSION }}
           aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
           aur_username: ${{ secrets.AUR_USERNAME }}
@@ -170,10 +167,10 @@ jobs:
           ref: insider
 
       - name: Check version
-        run: ./stores/snapcraft/check_version.sh
         env:
           ARCHITECTURE: ${{ matrix.platform }}
           SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
+        run: ./stores/snapcraft/check_version.sh
 
       - uses: docker/setup-qemu-action@v1
         if: env.SHOULD_DEPLOY == 'yes'

+ 1 - 1
.github/workflows/insider-windows.yml

@@ -139,7 +139,7 @@ jobs:
           RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
 
       - name: Release to WinGet
-        uses: vedantmgoyal2009/winget-releaser@latest
+        uses: vedantmgoyal2009/winget-releaser@v1
         with:
           identifier: ${{ env.APP_IDENTIFIER }}
           version: ${{ env.RELEASE_VERSION }}

+ 23 - 19
.github/workflows/stable-linux.yml

@@ -118,29 +118,22 @@ jobs:
   aur:
     needs: build
     runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+        - package_name: vscodium
+          package_type: stable
+        - package_name: vscodium-git
+          package_type: rolling
     if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
 
     steps:
-      - name: Get version
-        env:
-          RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
-        run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> $GITHUB_ENV
-
-      - name: Publish vscodium
+      - name: Publish ${{ matrix.package_name }}
         uses: zokugun/github-actions-aur-releaser@v1
         with:
-          package_name: vscodium
-          package_version: ${{ env.PACKAGE_VERSION }}
-          aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
-          aur_username: ${{ secrets.AUR_USERNAME }}
-          aur_email: ${{ secrets.AUR_EMAIL }}
-
-      - name: Publish vscodium-git
-        uses: zokugun/github-actions-aur-releaser@v1
-        with:
-          package_name: vscodium-git
-          package_type: rolling
-          package_version: ${{ env.PACKAGE_VERSION }}
+          package_name: ${{ matrix.package_name }}
+          package_type: ${{ matrix.package_type }}
           aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
           aur_username: ${{ secrets.AUR_USERNAME }}
           aur_email: ${{ secrets.AUR_EMAIL }}
@@ -163,10 +156,10 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Check version
-        run: ./stores/snapcraft/check_version.sh
         env:
           ARCHITECTURE: ${{ matrix.platform }}
           SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
+        run: ./stores/snapcraft/check_version.sh
 
       - uses: docker/setup-qemu-action@v1
         if: env.SHOULD_DEPLOY == 'yes'
@@ -191,3 +184,14 @@ jobs:
           snap: ${{ steps.build.outputs.snap }}
           release: stable
         if: env.SHOULD_DEPLOY == 'yes'
+
+  deb-rpm-repo-hook:
+    needs: build
+    runs-on: ubuntu-latest
+    if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
+
+    steps:
+      - name: Trigger repository rebuild
+        env:
+          GL_PAGES_TOKEN: ${{ secrets.GL_PAGES_TOKEN }}
+        run: curl -X POST --fail -F token="${GL_PAGES_TOKEN}" -F ref=master https://gitlab.com/api/v4/projects/8762263/trigger/pipeline

+ 1 - 1
.github/workflows/stable-windows.yml

@@ -132,7 +132,7 @@ jobs:
           RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
 
       - name: Release to WinGet
-        uses: daiyam/winget-releaser@insider
+        uses: vedantmgoyal2009/winget-releaser@v1
         with:
           identifier: ${{ env.APP_IDENTIFIER }}
           version: ${{ env.RELEASE_VERSION }}

+ 1 - 0
.github/workflows/stale.yml

@@ -16,6 +16,7 @@ jobs:
           days-before-stale: 180
           days-before-close: 30
           stale-issue-label: stale
+          operations-per-run: 1024
           stale-issue-message: >
             This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment**, and we'll keep it open. If you have any new additional information, please include it with your comment!
           close-issue-message: >

+ 2 - 0
build.sh

@@ -2,6 +2,8 @@
 
 set -ex
 
+. version.sh
+
 if [[ "${SHOULD_BUILD}" == "yes" ]]; then
   npm config set scripts-prepend-node-path true
   npm config set node_gyp

+ 2 - 2
check_tags.sh

@@ -49,7 +49,7 @@ contains() {
 if [ "${ASSETS}" != "null" ]; then
   # macos
   if [[ "${OS_NAME}" == "osx" ]]; then
-    if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_ARCH}" == "arm64" ]]; then
+    if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
       if [[ -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.tar.gz" ) || -z $( contains "${APP_NAME}-${RELEASE_VERSION}-src.zip" ) ]]; then
         echo "Building on MacOS because we have no SRC"
         export SHOULD_BUILD="yes"
@@ -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

+ 1 - 3
get_repo.sh

@@ -103,10 +103,8 @@ git checkout FETCH_HEAD
 cd ..
 
 # for GH actions
-if [[ ${GITHUB_ENV} ]]; then
+if [[ "${GITHUB_ENV}" ]]; then
   echo "MS_TAG=${MS_TAG}" >> "${GITHUB_ENV}"
   echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
   echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
 fi
-
-. version.sh

+ 2 - 2
prepare_vscode.sh

@@ -59,7 +59,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then
   yarn postinstall
 elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
   # node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
-  # from the custom headers path if dist-url option was set instead of
+  # from the custom headers path if dist-url option was set, instead of
   # using the config value from the process. Electron builds with pointer compression
   # enabled for x64 and arm64, but incorrectly ships a single copy of config.gypi
   # with v8_enable_pointer_compression option always set for all target architectures.
@@ -94,7 +94,7 @@ setpath "product" "keyboardShortcutsUrlLinux" "https://go.microsoft.com/fwlink/?
 setpath "product" "keyboardShortcutsUrlMac" "https://go.microsoft.com/fwlink/?linkid=832143"
 setpath "product" "keyboardShortcutsUrlWin" "https://go.microsoft.com/fwlink/?linkid=832145"
 setpath "product" "licenseUrl" "https://github.com/VSCodium/vscodium/blob/master/LICENSE"
-setpath "product" "linkProtectionTrustedDomains" '["https://open-vsx.org"]'
+setpath_json "product" "linkProtectionTrustedDomains" '["https://open-vsx.org"]'
 setpath "product" "releaseNotesUrl" "https://go.microsoft.com/fwlink/?LinkID=533483#vscode"
 setpath "product" "reportIssueUrl" "https://github.com/VSCodium/vscodium/issues/new"
 setpath "product" "requestFeatureUrl" "https://go.microsoft.com/fwlink/?LinkID=533482"

+ 1 - 1
stores/winget/check_version.sh

@@ -8,7 +8,7 @@ if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
   RELEASE_VERSION="${RELEASE_VERSION/\-insider/}"
 fi
 
-WINGET_VERSION=$( echo "${VERSIONS}" | jq -r 'map(.name) | last' )
+WINGET_VERSION=$( echo "${VERSIONS}" | jq -r 'map(select(.name | startswith("1."))) | map(.name) | last' )
 
 echo "RELEASE_VERSION=\"${RELEASE_VERSION}\""
 echo "WINGET_VERSION=\"${WINGET_VERSION}\""

+ 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

+ 4 - 10
version.sh

@@ -2,24 +2,18 @@
 
 if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
 
-    APP_HASH=$( git rev-parse HEAD )
-
-    cd vscode
-    VSCODE_HASH=$( git rev-parse HEAD )
-    cd ..
-
     if type -t "sha1sum" > /dev/null 2>&1; then
-      export BUILD_SOURCEVERSION=$( echo "${APP_HASH}:${VSCODE_HASH}" | sha1sum | cut -d' ' -f1 )
+      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION}" | sha1sum | cut -d' ' -f1 )
     else
       npm install -g checksum
 
-      export BUILD_SOURCEVERSION=$( echo "${APP_HASH}:${VSCODE_HASH}" | checksum )
+      export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION}" | checksum )
     fi
 
     echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
 
     # for GH actions
-    if [[ $GITHUB_ENV ]]; then
-        echo "BUILD_SOURCEVERSION=$BUILD_SOURCEVERSION" >> $GITHUB_ENV
+    if [[ "${GITHUB_ENV}" ]]; then
+        echo "BUILD_SOURCEVERSION=${BUILD_SOURCEVERSION}" >> "${GITHUB_ENV}"
     fi
 fi