-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (34 loc) · 844 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
37
38
39
40
41
42
43
44
deps:
go get -u github.com/joho/godotenv
go get -u github.com/aws/aws-sdk-go
go get -u github.com/fsnotify/fsnotify
go get -u github.com/mitchellh/gox
go get -u github.com/tcnksm/ghr
build: test fmt
go build
run:
go run *.go
test:
go test
fmt:
go fmt
travis: fmt test build
dist: dist/clean dist/build dist/pack dist/upload
dist/clean:
mkdir -p pkg/ dist/
rm -rf pkg/*
rm -rf dist/*
dist/build: XC_ARCH=386 amd64
dist/build: XC_OS=linux darwin windows
dist/build: test fmt
gox \
-os="$(XC_OS)" \
-arch="$(XC_ARCH)" \
-output "pkg/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}_{{.OS}}_{{.Arch}}"
dist/pack:
@for DIR in $$(ls pkg/ | grep -v dist/); do \
zip -j dist/$${DIR}.zip pkg/$${DIR}/*; \
done
dist/upload: RELEASE_VERSION=latest
dist/upload:
ghr -u voyagegroup -r sltd -recreate "$(RELEASE_VERSION)" dist/