-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8eda95
commit 8fcc7a9
Showing
5 changed files
with
63 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: go | ||
|
||
sudo: false | ||
|
||
go: | ||
- "1.10" | ||
|
||
script: | ||
- make test release | ||
|
||
deploy: | ||
provider: releases | ||
file: release/pomodoro* | ||
file_glob: true | ||
skip_cleanup: true | ||
api_key: | ||
secure: ZQObSk5C6MViH8yiKj89dCniBfHa0/625SAiqhU1anoiSioVcG0oAdeiH14zIlCb8Ivf8Ng831R6Jddr/nAPhFsYkpJshbcYAALgReAdguzwons2hNp9BUM07AKlx8Ed3ygECwA8ZQsaJZTV6t6lTAf6t6p0r8JHtxpRRu1ex8eItsJBwEp5KalPemk5dccxAWsJ1M/uSJFMMMS6HpP9y1MWOsHNyFQalx0f9DiW2Gmcy8wtAqfjCdZubtwxBR8gsN/bLT5t2ybBSJea/E9Qao7LGZc8WQUU77CteJkaoWsctEk7bShD9Vw0oioEy7c5ZqjWNHufA3/NEGXM5IvbsHktArQ23PYaHVh5gFyD66nCUDd6wB7MDtOtx8JJzuX7+UpvAePj5ARi0Rdn/pFz4W2rwKErWRSlgZnLNnD9Ay62Upi8XUGoeNoIP5/R7vJmfgD3DuecQmLgEnzLc4NkjV4eH4nPfn4+LRJkc6GD/cZPWj4wAM/GOFBTkVeJomEtPjJViQ1uSPDIskq0YQ0lopmXdeXuIqtzvS4pcq+JlxWPLEa6ZrOs3INT2nPJ05gMOiAhTwGvKuMYN80h80zksW3+Yq0b8ZaNl2O1Ogt2ImDgJvptJt4kEGUjKWFVIVDiy+57ksd1CaiUt/ns1FLt/bCtg56DEB2FUvIYNK3fCA8= | ||
on: | ||
repo: open-pomodoro/openpomodoro-cli | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
DEMO_COMMANDS := start status end status start clear status | ||
DEMO_COMMANDS := start status | ||
TMPDIR := $(shell mktemp -d) | ||
NAME := pomodoro | ||
BINDIR := release | ||
BIN := $(BINDIR)/$(NAME) | ||
|
||
demo: bin/pomodoro | ||
@for s in $(DEMO_COMMANDS); do \ | ||
echo; \ | ||
echo $$ pomodoro $$s; \ | ||
pomodoro --directory $(TMPDIR) $$s; \ | ||
done | ||
GOX_OSARCH := darwin/amd64 linux/amd64 | ||
VERSION := 0.1.0 | ||
|
||
bin/pomodoro: *.go | ||
go build -o $@ | ||
LDFLAGS := "-X main.Version=$(VERSION)" | ||
|
||
.PHONY: demo | ||
default: deps test build | ||
|
||
test: deps | ||
go test ./... | ||
|
||
install: build | ||
cp $(BIN) /usr/local/bin/$(NAME) | ||
|
||
build: $(BIN) | ||
|
||
clean: | ||
rm -rf $(BINDIR) | ||
|
||
$(BIN): deps | ||
go build -ldflags $(LDFLAGS) -o $@ | ||
|
||
release: deps | ||
gox \ | ||
-ldflags $(LDFLAGS) -osarch="$(GOX_OSARCH)" \ | ||
-output="release/$(NAME)_{{.OS}}_{{.Arch}}_$(VERSION)" \ | ||
./cmd/$(NAME) | ||
cd release/; for f in *; do mv -v $$f $(NAME); tar -zcf $$f.tar.gz $(NAME); rm $(NAME); done | ||
|
||
deps: | ||
go get -t ./... | ||
go get github.com/mitchellh/gox | ||
|
||
.PHONY: all build clean default deps release test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters