File tree 2 files changed +39
-0
lines changed
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 4
4
* .so
5
5
* .dylib
6
6
7
+ # Ignore dist
8
+ dist
9
+ flora
10
+
7
11
# Test binary, build with `go test -c`
8
12
* .test
9
13
Original file line number Diff line number Diff line change
1
+ VERSION ?= $(git describe --tags )
2
+ DIST_DIRS := find * -type d -exec
3
+
4
+ init :
5
+ go get -u github.com/laher/goxc
6
+ dep ensure
7
+
8
+ build :
9
+ go build -ldflags " -X main.version=${VERSION} " cmd/flora/flora.go
10
+
11
+ build-all :
12
+ gox -verbose \
13
+ -ldflags " -X main.version=${VERSION} " \
14
+ -os=" linux darwin windows" \
15
+ -arch=" amd64" \
16
+ -output=" dist/{{.OS}}-{{.Arch}}/{{.Dir}}" ./cmd/flora/
17
+
18
+ pre-dist :
19
+ go get github.com/mitchellh/gox
20
+ mkdir -p dist
21
+
22
+ dist : pre-dist build-all
23
+ cd dist && \
24
+ $(DIST_DIRS ) cp ../LICENSE {} \; && \
25
+ $(DIST_DIRS ) cp ../README.md {} \; && \
26
+ $(DIST_DIRS ) tar -zcf flora-${VERSION} -{}.tar.gz {} \; && \
27
+ $(DIST_DIRS ) zip -r flora-${VERSION} -{}.zip {} \; && \
28
+ cd ..
29
+
30
+ vet :
31
+ go tool vet .
32
+
33
+ all : bootastrap vet dist
34
+
35
+ .PHONY : init build build-darwin build-win build-all dist vet
You can’t perform that action at this time.
0 commit comments