File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ dbuild: gen vet
1414 GOOS=linux scripts/build.sh
1515.PHONY : dbuild
1616
17- # build-debug:
18- # CGO_ENABLED=0 $(GO) build -gcflags="all=-N -l" -o bin/mgmt cmd/mgmt/*.go
19- # .PHONY: build-debug
20-
2117gen :
2218 sh -c " cd ../protos && make all"
2319.PHONY : gen
Original file line number Diff line number Diff line change @@ -4,14 +4,8 @@ BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
44GIT_COMMIT=$( git rev-parse HEAD)
55VERSION=$( git describe --tags --abbrev=0 | tr -d ' \n' )
66
7- if [ ! -z " ${TILT_HOST} " ]; then
8- # when invoked by tilt set the OS so that binary will run on linux container
9- # Note the ldflags set here are used only for local builds.
10- CGO_ENABLED=0 GOOS=linux go build -ldflags=" -s -w -X 'github.com/missingstudio/studio/backend/internal/version.gitVersion=$VERSION ' -X 'github.com/missingstudio/studio/backend/internal/version.buildDate=$BUILD_DATE ' -X 'github.com/missingstudio/studio/backend/internal/version.gitCommit=$GIT_COMMIT '" -o bin/mgmt main.go
11- # CGO_ENABLED=0 GOOS=linux go build -gcflags="all=-N -l" -o bin/mgmt main.go
12- elif [ ! -z " ${GOOS} " ]; then
13- CGO_ENABLED=0 GOOS=" ${GOOS} " go build -ldflags=" -s -w -X 'github.com/missingstudio/studio/backend/internal/version.gitVersion=$VERSION ' -X 'github.com/missingstudio/studio/backend/internal/version.buildDate=$BUILD_DATE ' -X 'github.com/missingstudio/studio/backend/internal/version.gitCommit=$GIT_COMMIT '" -o bin/mgmt main.go
7+ if [ ! -z " ${GOOS} " ]; then
8+ CGO_ENABLED=0 GOOS=" ${GOOS} " go build -ldflags=" -s -w -X 'github.com/missingstudio/studio/backend/internal/version.gitVersion=$VERSION ' -X 'github.com/missingstudio/studio/backend/internal/version.buildDate=$BUILD_DATE ' -X 'github.com/missingstudio/studio/backend/internal/version.gitCommit=$GIT_COMMIT '" -o bin/mobius main.go
149else
15- CGO_ENABLED=0 go build -ldflags=" -s -w -X 'github.com/missingstudio/studio/backend/internal/version.gitVersion=$VERSION ' -X 'github.com/missingstudio/studio/backend/internal/version.buildDate=$BUILD_DATE ' -X 'github.com/missingstudio/studio/backend/internal/version.gitCommit=$GIT_COMMIT '" -o bin/mgmt main.go
16- # CGO_ENABLED=0 $(GO) build -gcflags="all=-N -l" -o bin/mgmt main.go
10+ CGO_ENABLED=0 go build -ldflags=" -s -w -X 'github.com/missingstudio/studio/backend/internal/version.gitVersion=$VERSION ' -X 'github.com/missingstudio/studio/backend/internal/version.buildDate=$BUILD_DATE ' -X 'github.com/missingstudio/studio/backend/internal/version.gitCommit=$GIT_COMMIT '" -o bin/mobius main.go
1711fi
You can’t perform that action at this time.
0 commit comments