Skip to content

Commit

Permalink
Merge pull request #3 from appvia/fix_release
Browse files Browse the repository at this point in the history
Fix makefile build
  • Loading branch information
KashifSaadat authored Jul 15, 2019
2 parents a422a70 + 6420211 commit 4ecc2f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
working_directory: /go/src/github.com/appvia/aws_usersync
steps:
- checkout
- run: go get github.com/mitchellh/gox
- run: go get github.com/tcnksm/ghr
- run: mkdir ./bin
- run: gox -osarch="linux/amd64" -output=./bin/$CIRCLE_PROJECT_REPONAME-$CIRCLE_TAG
- run: make static
- run: git config --global user.name jon-shanks
- run: ghr $CIRCLE_TAG ./bin/

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ROOT_DIR=${PWD}
HARDWARE=$(shell uname -m)
GIT_SHA=$(shell git --no-pager describe --always --dirty)
BUILD_TIME=$(shell date -u '+%Y-%m-%d_%I:%M:%S%p')
VERSION ?= $(shell awk '/Version.*=/ { print $$3 }' cmd/aws_usersync/main.go | sed 's/"//g')
VERSION ?= $(shell awk '/version .*=/ { print $$3 }' cmd/aws_usersync/main.go | sed 's/"//g')
DEPS=$(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
PACKAGES=$(shell go list ./...)
LFLAGS ?= -X main.GitSHA=${GIT_SHA}
Expand All @@ -32,7 +32,7 @@ build:
static: golang deps
@echo "--> Compiling the static binary"
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags "-w ${LFLAGS}" -o bin/${NAME} cmd/${NAME}/*.go
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags "-w ${LFLAGS}" -o bin/${NAME}-${VERSION}-linux-amd64 cmd/${NAME}/*.go

docker-release:
@echo "--> Building a release image"
Expand Down

0 comments on commit 4ecc2f5

Please sign in to comment.