Merge pull request #900 from sdowell/debian-build-image
use debian build image and bash build scripts
This commit is contained in:
commit
9d32cb1fed
2
Makefile
2
Makefile
|
|
@ -51,7 +51,7 @@ IMAGE := $(REGISTRY)/$(BIN)
|
|||
TAG := $(VERSION)
|
||||
OS_ARCH_TAG := $(TAG)__$(OS)_$(ARCH)
|
||||
|
||||
BUILD_IMAGE ?= golang:1.22-alpine
|
||||
BUILD_IMAGE ?= golang:1.22
|
||||
|
||||
DBG_MAKEFILE ?=
|
||||
ifneq ($(DBG_MAKEFILE),1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2016 The Kubernetes Authors.
|
||||
#
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "${ARCH:-}" ]; then
|
||||
echo "ARCH must be set"
|
||||
|
|
@ -34,7 +35,7 @@ export CGO_ENABLED=0
|
|||
export GOARCH="${ARCH}"
|
||||
export GOOS="${OS}"
|
||||
|
||||
if [ "${BUILD_DEBUG:-0}" -eq 1 ]; then
|
||||
if [[ "${BUILD_DEBUG:-0}" == 1 ]]; then
|
||||
# Debugging - disable optimizations and inlining
|
||||
gogcflags="all=-N -l"
|
||||
goasmflags=""
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2016 The Kubernetes Authors.
|
||||
#
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
export CGO_ENABLED=0
|
||||
export GOFLAGS="-mod=vendor"
|
||||
|
|
@ -24,7 +25,7 @@ echo "Running tests:"
|
|||
go test -installsuffix "static" "$@"
|
||||
echo
|
||||
|
||||
echo "Checking gofmt: "
|
||||
echo -n "Checking gofmt: "
|
||||
ERRS="$(go fmt "$@")"
|
||||
if [ -n "${ERRS}" ]; then
|
||||
echo "FAIL - the following files need to be gofmt'ed:"
|
||||
|
|
@ -37,7 +38,7 @@ fi
|
|||
echo "PASS"
|
||||
echo
|
||||
|
||||
echo "Checking go vet: "
|
||||
echo -n "Checking go vet: "
|
||||
ERRS="$(go vet "$@" 2>&1 || true)"
|
||||
if [ -n "${ERRS}" ]; then
|
||||
echo "FAIL"
|
||||
|
|
|
|||
Loading…
Reference in New Issue