Skip to content

Commit

Permalink
Adds helpers for building a release.
Browse files Browse the repository at this point in the history
  • Loading branch information
fgeller committed Feb 3, 2016
1 parent 61955dd commit e92f7c1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
export SHELL:=/usr/local/bin/bash -O extglob -c
export GO15VENDOREXPERIMENT:=1

build: GOOS ?= darwin
build: GOARCH ?= amd64
build:
go build .
rm -f kt
GOOS=${GOOS} GOARCH=${GOARCH} go build .

release-linux:
GOOS=linux $(MAKE) build
file kt
tar Jcf kt-`git describe --abbrev=0 --tags`-linux-amd64.xz kt

release-darwin:
GOOS=darwin $(MAKE) build
file kt
tar Jcf kt-`git describe --abbrev=0 --tags`-darwin-amd64.xz kt

release: clean release-linux release-darwin

clean:
rm -f kt
rm -f kt-*.xz

run: build
./kt

0 comments on commit e92f7c1

Please sign in to comment.