feat: allows to forcely update versions [skip ci]

This commit is contained in:
Baptiste Augrain 2023-01-08 15:33:27 +01:00
parent ceaf9ce37b
commit 32637c09c8
4 changed files with 16 additions and 4 deletions

View file

@ -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:

View file

@ -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()

View file

@ -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

View file

@ -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