diff --git a/.gitignore b/.gitignore index b3271df..d613f10 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,8 @@ _testmain.go *.swp -bin/ +bin/* +!bin/.gitkeep www/public/ www/data/ diff --git a/Makefile b/Makefile index 7e1ee97..71ead2f 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,14 @@ endif test \ docs \ readme \ - release + release \ + release-linux \ + release-darwin all: bin/pomo clean: - -rm -fv bin/* docs/* + -rm -rfv bin/* docs/* bindata.go: tomato-icon.png go-bindata -pkg main -o $@ $^ @@ -22,15 +24,27 @@ test: go test ./... go vet ./... -release-linux: bin bindata.go - go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo-$(VERSION)-linux-amd64 +bin/pomo-$(VERSION)-linux-amd64: bin bindata.go + go build -ldflags "-X main.Version=$(VERSION)" -o $@ -release-osx: bin bindata.go +bin/pomo-$(VERSION)-linux-amd64.md5: + md5sum bin/pomo-$(VERSION)-linux-amd64 > $@ + +bin/pomo-$(VERSION)-darwin-amd64: bin bindata.go # This is used to cross-compile a Darwin compatible Mach-O executable # on Linux for OSX, you need to install https://github.com/tpoechtrager/osxcross - 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 + 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.md5: + md5sum bin/pomo-$(VERSION)-darwin-amd64 > $@ + +release-linux: bin/pomo-$(VERSION)-linux-amd64 bin/pomo-$(VERSION)-linux-amd64 + +release-darwin: bin/pomo-$(VERSION)-darwin-amd64 bin/pomo-$(VERSION)-darwin-amd64 + +release: release-linux release-darwin + docs: readme cd www && hugo -d ../docs diff --git a/bin/.gitkeep b/bin/.gitkeep new file mode 100644 index 0000000..e69de29