fix: correctly read exit status (#914)

This commit is contained in:
Baptiste Augrain 2021-11-10 10:40:20 +01:00 committed by GitHub
parent cf48030b59
commit 23313d41ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -95,7 +95,7 @@ jobs:
- name: Release - name: Release
env: env:
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View File

@ -82,7 +82,7 @@ jobs:
- name: Release - name: Release
env: env:
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View File

@ -22,9 +22,9 @@ for FILE in *
do do
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
echo "Uploading '${FILE}' at $( date "+%T" )" echo "Uploading '${FILE}' at $( date "+%T" )"
EXIT_STATUS=$( gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" ) gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
if ! (( $EXIT_STATUS )); then if ! (( $? )); then
for (( i=0; i<10; i++ )) for (( i=0; i<10; i++ ))
do do
github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
@ -32,7 +32,9 @@ do
sleep $(( 15 * (i + 1))) sleep $(( 15 * (i + 1)))
echo "RE-Uploading '${FILE}' at $( date "+%T" )" echo "RE-Uploading '${FILE}' at $( date "+%T" )"
EXIT_STATUS=$( gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" ) gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: $EXIT_STATUS" echo "exit: $EXIT_STATUS"
if ! (( $EXIT_STATUS )); then if ! (( $EXIT_STATUS )); then