mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-04-24 18:02:15 +00:00
refactor: Clarify why assets
is constructed as an array
This commit is contained in:
parent
4308ed0075
commit
36620ac8b8
1 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,10 @@ ensure_tag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
upload_release() {
|
upload_release() {
|
||||||
local assets=() # Array over string to resolve SC2086, see https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions
|
# assets is defined as a list of arguments, where values may contain whitespace and need to be quoted like this -a "my file.txt" -a "file.txt".
|
||||||
|
# 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
|
||||||
|
local assets=()
|
||||||
for file in "$RELEASE_DIR"/*; do
|
for file in "$RELEASE_DIR"/*; do
|
||||||
assets=("${assets[@]}" -a "$file")
|
assets=("${assets[@]}" -a "$file")
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue