Skip to content

Commit

Permalink
cleans up targets to build releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
fgeller committed Jul 30, 2016
1 parent ed900e2 commit 52a80a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ build: GOARCH ?= amd64
build: clean
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -o ${ARTIFACT} -a *.go

release: GOOS ?= ${OS}
release: GOARCH ?= amd64
release: build
tar Jcf ${ARTIFACT}-`git rev-parse HEAD | cut -c-7`-${GOOS}-${GOARCH}.xz ${ARTIFACT}

linux-release:
GOOS=linux $(MAKE) build
GOOS=linux $(MAKE) release

darwin-release:
GOOS=darwin $(MAKE) build
GOOS=darwin $(MAKE) release

releases: linux-release darwin-release

Expand Down

0 comments on commit 52a80a5

Please sign in to comment.