Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert 894, fix build scripts to be strict sh #896

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Copyright 2016 The Kubernetes Authors.
#
Expand All @@ -16,7 +16,6 @@

set -o errexit
set -o nounset
set -o pipefail

if [ -z "${ARCH:-}" ]; then
echo "ARCH must be set"
Expand All @@ -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=""
Expand Down
7 changes: 3 additions & 4 deletions build/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Copyright 2016 The Kubernetes Authors.
#
Expand All @@ -16,7 +16,6 @@

set -o errexit
set -o nounset
set -o pipefail

export CGO_ENABLED=0
export GOFLAGS="-mod=vendor"
Expand All @@ -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:"
Expand All @@ -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"
Expand Down
Loading