Skip to content

Commit

Permalink
Merge pull request #896 from thockin/master
Browse files Browse the repository at this point in the history
Revert 894, fix build scripts to be strict sh
  • Loading branch information
k8s-ci-robot authored Jun 21, 2024
2 parents 650be63 + 8ed7195 commit 54491b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 54491b2

Please sign in to comment.