Skip to content

Commit c86c399

Browse files
committed
added ability to generate releases
1 parent 019036c commit c86c399

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
certgraph
22
certgraph.mac
3+
certgraph.linux
4+
certgraph.exe
5+
*.zip
36
*.json

Makefile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1+
GIT_DATE := $(shell git log -1 --date=short --pretty='%cd' | tr -d -)
2+
13
all: certgraph
24

5+
fmt:
6+
gofmt -s -w -l .
7+
38
certgraph: certgraph.go
49
go build -o $@ $^
510

11+
certgraph.linux: certgraph.go
12+
GOOS=linux go build -o $@ $^
13+
614
certgraph.mac: certgraph.go
715
GOOS=darwin go build -o $@ $^
816

9-
fmt:
10-
gofmt -s -w -l .
17+
certgraph.exe: certgraph.go
18+
GOOS=windows GOARCH=386 go build -o certgraph.exe $^
19+
20+
release.linux: certgraph.linux
21+
zip certgraph.linux.$(GIT_DATE).zip $^
22+
23+
release.mac: certgraph.mac
24+
zip certgraph.mac.$(GIT_DATE).zip $^
25+
26+
release.win: certgraph.exe
27+
zip certgraph.win.$(GIT_DATE).zip $^
28+
29+
release: release.mac release.linux release.win

0 commit comments

Comments
 (0)