File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 working_directory : /go/src/github.com/appvia/aws_usersync
1616 steps :
1717 - checkout
18- - run : go get github.com/mitchellh/gox
1918 - run : go get github.com/tcnksm/ghr
2019 - run : mkdir ./bin
21- - run : gox -osarch="linux/amd64" -output=./bin/$CIRCLE_PROJECT_REPONAME-$CIRCLE_TAG
20+ - run : make static
2221 - run : git config --global user.name jon-shanks
2322 - run : ghr $CIRCLE_TAG ./bin/
2423
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ROOT_DIR=${PWD}
66HARDWARE =$(shell uname -m)
77GIT_SHA =$(shell git --no-pager describe --always --dirty)
88BUILD_TIME =$(shell date -u '+% Y-% m-% d_% I:% M:% S% p')
9- VERSION ?= $(shell awk '/Version .* =/ { print $$3 }' cmd/aws_usersync/main.go | sed 's/"//g')
9+ VERSION ?= $(shell awk '/version .* =/ { print $$3 }' cmd/aws_usersync/main.go | sed 's/"//g')
1010DEPS =$(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
1111PACKAGES =$(shell go list ./...)
1212LFLAGS ?= -X main.GitSHA=${GIT_SHA}
3232static : golang deps
3333 @echo " --> Compiling the static binary"
3434 mkdir -p bin
35- CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags " -w ${LFLAGS} " -o bin/${NAME} cmd/${NAME} /* .go
35+ CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags " -w ${LFLAGS} " -o bin/${NAME} - ${VERSION} -linux-amd64 cmd/${NAME} /* .go
3636
3737docker-release :
3838 @echo " --> Building a release image"
You can’t perform that action at this time.
0 commit comments