Commit
+22 -7 +/-3 browse
1 | diff --git a/.gitignore b/.gitignore |
2 | index b3271df..d613f10 100644 |
3 | --- a/.gitignore |
4 | +++ b/.gitignore |
5 | @@ -25,7 +25,8 @@ _testmain.go |
6 | |
7 | *.swp |
8 | |
9 | - bin/ |
10 | + bin/* |
11 | + !bin/.gitkeep |
12 | |
13 | www/public/ |
14 | www/data/ |
15 | diff --git a/Makefile b/Makefile |
16 | index 7e1ee97..71ead2f 100644 |
17 | --- a/Makefile |
18 | +++ b/Makefile |
19 | @@ -8,12 +8,14 @@ endif |
20 | test \ |
21 | docs \ |
22 | readme \ |
23 | - release |
24 | + release \ |
25 | + release-linux \ |
26 | + release-darwin |
27 | |
28 | all: bin/pomo |
29 | |
30 | clean: |
31 | - -rm -fv bin/* docs/* |
32 | + -rm -rfv bin/* docs/* |
33 | |
34 | bindata.go: tomato-icon.png |
35 | go-bindata -pkg main -o $@ $^ |
36 | @@ -22,14 +24,26 @@ test: |
37 | go test ./... |
38 | go vet ./... |
39 | |
40 | - release-linux: bin bindata.go |
41 | - go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo-$(VERSION)-linux-amd64 |
42 | + bin/pomo-$(VERSION)-linux-amd64: bin bindata.go |
43 | + go build -ldflags "-X main.Version=$(VERSION)" -o $@ |
44 | |
45 | - release-osx: bin bindata.go |
46 | + bin/pomo-$(VERSION)-linux-amd64.md5: |
47 | + md5sum bin/pomo-$(VERSION)-linux-amd64 > $@ |
48 | + |
49 | + bin/pomo-$(VERSION)-darwin-amd64: bin bindata.go |
50 | # This is used to cross-compile a Darwin compatible Mach-O executable |
51 | # on Linux for OSX, you need to install https://github.com/tpoechtrager/osxcross |
52 | - PATH="$$PATH:/usr/local/osx-ndk-x86/bin" GOOS=darwin GOARCH=amd64 CC=/usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-cc CGO_ENABLED=1 go build $(FLAGS) -o bin/pomo-$(VERSION)-darwin-amd64 |
53 | + PATH="$$PATH:/usr/local/osx-ndk-x86/bin" GOOS=darwin GOARCH=amd64 CC=/usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-cc CGO_ENABLED=1 go build $(FLAGS) -o $@ |
54 | + |
55 | + |
56 | + bin/pomo-$(VERSION)-darwin-amd64.md5: |
57 | + md5sum bin/pomo-$(VERSION)-darwin-amd64 > $@ |
58 | + |
59 | + release-linux: bin/pomo-$(VERSION)-linux-amd64 bin/pomo-$(VERSION)-linux-amd64 |
60 | + |
61 | + release-darwin: bin/pomo-$(VERSION)-darwin-amd64 bin/pomo-$(VERSION)-darwin-amd64 |
62 | |
63 | + release: release-linux release-darwin |
64 | |
65 | docs: readme |
66 | cd www && hugo -d ../docs |
67 | diff --git a/bin/.gitkeep b/bin/.gitkeep |
68 | new file mode 100644 |
69 | index 0000000..e69de29 |
70 | --- /dev/null |
71 | +++ b/bin/.gitkeep |