1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: convert run install script to pure POSIX sh (#4736)

The changes are minimal and the benefit is quite nice – this script can
now be used to install GoReleaser on e.g. Alpine Linux without `bash`.


`shellcheck run` and `shfmt run` both report no warnings/errors.
This commit is contained in:
Bartek Pacia 2024-04-01 00:48:38 +02:00 committed by GitHub
parent 26c003a076
commit 5a8b6d41fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
www/docs/static/run vendored
View File

@ -1,8 +1,10 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -e
is_pro="false"
if [[ "$VERSION" == *-pro ]]; then
DISTRIBUTION="pro"
is_pro="true"
fi
if test "$DISTRIBUTION" = "pro"; then
@ -24,7 +26,7 @@ test -z "$VERSION" && {
exit 1
}
if test "$DISTRIBUTION" = "pro" && [[ "$VERSION" != *-pro ]]; then
if test "$DISTRIBUTION" = "pro" && ! test "$is_pro"; then
VERSION="$VERSION-pro"
fi