File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1
1
go-junit-report
2
+ build /
Original file line number Diff line number Diff line change
1
+ VERSION =$(shell git describe --match="v* ")
2
+ REVISION =$(shell git rev-parse HEAD)
3
+ TIMESTAMP =$(shell date +% FT% T)
4
+
5
+ test :
6
+ go test ./...
7
+
8
+ build/go-junit-report build/go-junit-report.exe : clean
9
+ go build --ldflags " -s -X main.Version=$( VERSION) -X main.Revision=$( REVISION) -X main.BuildTime=$( TIMESTAMP) " -o $@
10
+
11
+ build/go-junit-report-$(VERSION ) -$(GOOS ) -$(GOARCH ) .tar.gz : build/go-junit-report
12
+ tar czf $@ -C build go-junit-report
13
+
14
+ build/go-junit-report-$(VERSION ) -windows-amd64.zip : build/go-junit-report.exe
15
+ zip -j $@ build/go-junit-report.exe
16
+
17
+ release : test
18
+ $(MAKE ) GOOS=linux GOARCH=amd64 build/go-junit-report-$(VERSION ) -linux-amd64.tar.gz
19
+ $(MAKE ) GOOS=windows GOARCH=amd64 build/go-junit-report-$(VERSION ) -windows-amd64.zip
20
+ $(MAKE ) GOOS=darwin GOARCH=amd64 build/go-junit-report-$(VERSION ) -darwin-amd64.tar.gz
21
+
22
+ clean :
23
+ rm -f build/go-junit-report
24
+ rm -f build/go-junit-report.exe
25
+
26
+ .PHONY : build clean release test
You can’t perform that action at this time.
0 commit comments