mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-04 00:18:53 +00:00
Update Alpine base to 3.13; go-compile rebuilt with mod=vendor option, go bumped to 1.16
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -13,6 +13,9 @@ dir="$1"
|
||||
|
||||
cd "$dir"
|
||||
|
||||
# Use '-mod=vendor' for builds which have switched to go modules
|
||||
[ -f go.mod -a -d vendor ] && export GOFLAGS="-mod=vendor"
|
||||
|
||||
# lint before building
|
||||
>&2 echo "gofmt..."
|
||||
test -z $(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)
|
||||
@@ -33,4 +36,5 @@ go test
|
||||
|
||||
[ "${REQUIRE_CGO}" = 1 ] || export CGO_ENABLED=0
|
||||
|
||||
go install -buildmode pie -ldflags "-s -w ${ldflags} -extldflags \"-fno-PIC -static\""
|
||||
go install -buildmode pie -ldflags "-linkmode=external -s -w ${ldflags} -extldflags \"-fno-PIC -static\""
|
||||
|
||||
|
Reference in New Issue
Block a user