mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2026-02-03 22:38:09 +00:00
fix: use proper comparison (#133)
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:
parent
a1314c9c65
commit
5c6400d871
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue