mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-04 03:11:55 +02:00
Merge pull request from GHSA-2fvp-53hw-f9fc
Also takes care of removing the temporary directory when done. Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
b6e9eb81e4
commit
265148c661
13
www/docs/static/run
vendored
13
www/docs/static/run
vendored
@ -20,11 +20,13 @@ test -z "$VERSION" && {
|
||||
exit 1
|
||||
}
|
||||
|
||||
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
|
||||
export TAR_FILE="$TMPDIR/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
|
||||
TMP_DIR="$(mktemp -d)"
|
||||
# shellcheck disable=SC2064 # intentionally expands here
|
||||
trap "rm -rf \"$TMP_DIR\"" EXIT
|
||||
export TAR_FILE="$TMP_DIR/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
|
||||
|
||||
(
|
||||
cd "$TMPDIR"
|
||||
cd "$TMP_DIR"
|
||||
echo "Downloading GoReleaser $VERSION..."
|
||||
curl -sfLo "$TAR_FILE" \
|
||||
"$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
|
||||
@ -44,6 +46,5 @@ export TAR_FILE="$TMPDIR/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
|
||||
fi
|
||||
)
|
||||
|
||||
tar -xf "$TAR_FILE" -C "$TMPDIR"
|
||||
"${TMPDIR}/goreleaser" "$@"
|
||||
|
||||
tar -xf "$TAR_FILE" -C "$TMP_DIR"
|
||||
"$TMP_DIR/goreleaser" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user