forked from benbjohnson/ego
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 682 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 682 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
VERSION=0.1.0
GOLDFLAGS="-X main.version $(VERSION)"
default:
bin:
mkdir -p bin
rm -rf bin/*
release: release-windows release-darwin release-linux
release-windows: bin
GOOS=windows GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego
cd bin && tar -cvzf ego$(VERSION).windows-amd64.tgz ego
rm bin/ego
release-darwin: bin
GOOS=darwin GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego
cd bin && tar -cvzf ego$(VERSION).darwin-amd64.tgz ego
rm bin/ego
release-linux: bin
GOOS=linux GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego
cd bin && tar -cvzf ego$(VERSION).linux-amd64.tgz ego
rm bin/ego
.PHONY: bin default release