forked from sachaos/todoist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 922 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARTIFACTS_DIR=artifacts/${VERSION}
GITHUB_USERNAME=sachaos
.PHONY: install
install: prepare
go install
.PHONY: build
build: prepare
go build
.PHONY: test
test: prepare
go test -v
.PHONY: prepare
prepare: filter_parser.go
.PHONY: release
release: prepare
GOOS=windows GOARCH=amd64 go build -o $(ARTIFACTS_DIR)/todoist_windows_amd64.exe
GOOS=darwin GOARCH=amd64 go build -o $(ARTIFACTS_DIR)/todoist_darwin_amd64
GOOS=darwin GOARCH=arm64 go build -o $(ARTIFACTS_DIR)/todoist_darwin_arm64
GOOS=linux GOARCH=amd64 go build -o $(ARTIFACTS_DIR)/todoist_linux_amd64
ghr -u $(GITHUB_USERNAME) -t $(shell cat github_token) --replace ${VERSION} $(ARTIFACTS_DIR)
filter_parser.go: filter_parser.y
go get golang.org/x/tools/cmd/goyacc
goyacc -o filter_parser.go filter_parser.y
rm y.output
docker-build:
docker build -t todoist --build-arg TODOIST_API_TOKEN=$(token) .
docker-run:
docker run -it todoist /bin/bash