Skip to content

Commit 05277cc

Browse files
committed
BUILD/MINOR: make: remove GOOS env var from go build
We want to keep our Makefile platform related so the GOOS gets picked up based on the platform you are running it. In case you need to manipulate the GOOS, you can still do it by using GOOS="linux" make build. We don't want to default to linux.
1 parent acbffa2 commit 05277cc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ GIT_MODIFIED2=$(shell git diff --quiet || echo .dirty)
88
GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2}
99
BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
1010
CGO_ENABLED?=0
11-
GOOS?=linux
1211

1312
all: update clean build
1413

@@ -21,7 +20,7 @@ clean:
2120
.PHONY: build
2221
build:
2322
mkdir -p ${DATAPLANEAPI_PATH}/build
24-
GOOS=$(GOOS) CGO_ENABLED=$(CGO_ENABLED) go build -trimpath -ldflags "-X \"main.GitRepo=${GIT_REPO}\" -X main.GitTag=${GIT_LAST_TAG} -X main.GitCommit=${GIT_HEAD_COMMIT} -X main.GitDirty=${GIT_MODIFIED} -X main.BuildTime=${BUILD_DATE}" -o ${DATAPLANEAPI_PATH}/build/dataplaneapi ${DATAPLANEAPI_PATH}/cmd/dataplaneapi/
23+
CGO_ENABLED=$(CGO_ENABLED) go build -trimpath -ldflags "-X \"main.GitRepo=${GIT_REPO}\" -X main.GitTag=${GIT_LAST_TAG} -X main.GitCommit=${GIT_HEAD_COMMIT} -X main.GitDirty=${GIT_MODIFIED} -X main.BuildTime=${BUILD_DATE}" -o ${DATAPLANEAPI_PATH}/build/dataplaneapi ${DATAPLANEAPI_PATH}/cmd/dataplaneapi/
2524

2625
.PHONY: e2e
2726
e2e: build

0 commit comments

Comments
 (0)