fix: use proper comparison (#133)
Some checks are pending
/ integration (push) Waiting to run
/ tests (push) Waiting to run

Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/133
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
Michael Kriese 2026-01-22 17:37:36 +00:00 committed by Michael Kriese
parent a1314c9c65
commit 5c6400d871
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201

View file

@ -18,6 +18,7 @@ if ${VERBOSE:-false}; then set -x; fi
: ${HIDE_ARCHIVE_LINK:=false} : ${HIDE_ARCHIVE_LINK:=false}
: ${RETRY:=1} : ${RETRY:=1}
: ${DELAY:=10} : ${DELAY:=10}
: ${SKIP_ASSETS:=false}
RELEASE_NOTES_ASSISTANT_VERSION=v1.5.1 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org RELEASE_NOTES_ASSISTANT_VERSION=v1.5.1 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org
@ -84,7 +85,7 @@ upload_release() {
# It is expanded using "${assets[@]}" which preserves the separation of arguments and not split whitespace containing values. # It is expanded using "${assets[@]}" which preserves the separation of arguments and not split whitespace containing values.
# For reference, see https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions # For reference, see https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions
local assets=() local assets=()
if ! "$SKIP_ASSETS"; then if [ "$SKIP_ASSETS" == 'false' ]; then
for file in "$RELEASE_DIR"/*; do for file in "$RELEASE_DIR"/*; do
assets=("${assets[@]}" -a "$file") assets=("${assets[@]}" -a "$file")
done done
@ -209,7 +210,7 @@ download() {
( (
mkdir -p $RELEASE_DIR mkdir -p $RELEASE_DIR
cd $RELEASE_DIR cd $RELEASE_DIR
if [[ ${DOWNLOAD_LATEST} == "true" ]]; then if [[ ${DOWNLOAD_LATEST} = "true" ]]; then
echo "Downloading the latest release" echo "Downloading the latest release"
api GET repos/$REPO/releases/latest >"$TMP_DIR"/assets.json api GET repos/$REPO/releases/latest >"$TMP_DIR"/assets.json
elif [[ ${DOWNLOAD_LATEST} == "false" ]]; then elif [[ ${DOWNLOAD_LATEST} == "false" ]]; then