Fix build scripts to be strict sh
This commit is contained in:
parent
9fac204a9c
commit
8ed7195384
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "${ARCH:-}" ]; then
|
||||
echo "ARCH must be set"
|
||||
|
|
@ -35,7 +34,7 @@ export CGO_ENABLED=0
|
|||
export GOARCH="${ARCH}"
|
||||
export GOOS="${OS}"
|
||||
|
||||
if [[ "${BUILD_DEBUG:-}" == 1 ]]; then
|
||||
if [ "${BUILD_DEBUG:-}" -eq 1 ]; then
|
||||
# Debugging - disable optimizations and inlining
|
||||
gogcflags="all=-N -l"
|
||||
goasmflags=""
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
export CGO_ENABLED=0
|
||||
export GOFLAGS="-mod=vendor"
|
||||
|
|
@ -25,7 +24,7 @@ echo "Running tests:"
|
|||
go test -installsuffix "static" "$@"
|
||||
echo
|
||||
|
||||
echo -n "Checking gofmt: "
|
||||
echo "Checking gofmt: "
|
||||
ERRS="$(go fmt "$@")"
|
||||
if [ -n "${ERRS}" ]; then
|
||||
echo "FAIL - the following files need to be gofmt'ed:"
|
||||
|
|
@ -38,7 +37,7 @@ fi
|
|||
echo "PASS"
|
||||
echo
|
||||
|
||||
echo -n "Checking go vet: "
|
||||
echo "Checking go vet: "
|
||||
ERRS="$(go vet "$@" 2>&1 || true)"
|
||||
if [ -n "${ERRS}" ]; then
|
||||
echo "FAIL"
|
||||
|
|
|
|||
Loading…
Reference in New Issue