Prechádzať zdrojové kódy

feat: allows to forcely update versions [skip ci]

Baptiste Augrain 2 rokov pred
rodič
commit
32637c09c8

+ 5 - 1
.github/workflows/stable-linux.yml

@@ -6,6 +6,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      force_version:
+        type: boolean
+        description: Force update version
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -188,10 +191,11 @@ jobs:
 
       - name: Update versions repo
         env:
+          FORCE_UPDATE: ${{ github.event.inputs.force_version }}
           GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
           GITHUB_USERNAME: ${{ github.repository_owner }}
         run: ./update_version.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_DEPLOY == 'yes'
 
   aur:
     needs:

+ 5 - 1
.github/workflows/stable-macos.yml

@@ -6,6 +6,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      force_version:
+        type: boolean
+        description: Force update version
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -81,10 +84,11 @@ jobs:
 
       - name: Update versions repo
         env:
+          FORCE_UPDATE: ${{ github.event.inputs.force_version }}
           GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
           GITHUB_USERNAME: ${{ github.repository_owner }}
         run: ./update_version.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_DEPLOY == 'yes'
 
       - name: Clean up keychain
         if: always()

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

@@ -6,6 +6,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      force_version:
+        type: boolean
+        description: Force update version
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -93,10 +96,11 @@ jobs:
 
       - name: Update versions repo
         env:
+          FORCE_UPDATE: ${{ github.event.inputs.force_version }}
           GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
           GITHUB_USERNAME: ${{ github.repository_owner }}
         run: ./update_version.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_DEPLOY == 'yes'
 
   winget:
     needs: build

+ 1 - 1
update_version.sh

@@ -79,7 +79,7 @@ updateLatestVersion() {
   if [[ -f "versions/${VERSION_PATH}/latest.json" ]]; then
     CURRENT_VERSION=$( jq -r '.name' "versions/${VERSION_PATH}/latest.json" )
 
-    if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" ]]; then
+    if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
       return
     fi
   fi