forked from fgeller/kt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 673 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (22 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export SHELL:=/usr/bin/env bash -O extglob -c
export GO15VENDOREXPERIMENT:=1
export OS=$(shell uname | tr '[:upper:]' '[:lower:]')
build: GOOS ?= ${OS}
build: GOARCH ?= amd64
build: test
rm -f kt
GOOS=${GOOS} GOARCH=${GOARCH} go build -ldflags "-X main.buildTime=`date --iso-8601=s` -X main.buildVersion=`git rev-parse HEAD | cut -c-7`" .
release-linux:
GOOS=linux $(MAKE) build
tar Jcf kt-`git describe --abbrev=0 --tags`-linux-amd64.txz kt
release-darwin:
GOOS=darwin $(MAKE) build
tar Jcf kt-`git describe --abbrev=0 --tags`-darwin-amd64.txz kt
release: clean release-linux release-darwin
test:
go test -v
clean:
rm -f kt
rm -f kt-*.txz
run: build
./kt