-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 758 Bytes
/
Makefile
File metadata and controls
39 lines (29 loc) · 758 Bytes
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
NAME := atgen
VERSION = $(shell gobump show -r)
REVISION := $(shell git rev-parse --short HEAD)
all: build
setup:
go get golang.org/x/tools/cmd/goimports
go get github.com/tcnksm/ghr
go get github.com/Songmu/goxz/cmd/goxz
go get github.com/x-motemen/gobump/cmd/gobump
go get github.com/Songmu/ghch/cmd/ghch
test:
go test ./lib
go test -race ./lib
fmt: setup
goimports -w .
build:
go build -o ./bin/$(NAME)
clean:
rm bin/$(NAME)
package: setup
@sh -c "'$(CURDIR)/scripts/package.sh'"
crossbuild: setup
goxz -pv=v${VERSION} -build-ldflags="-X main.GitCommit=${REVISION}" \
-d=./pkg/dist/v${VERSION} \
-n ${NAME}
release: package
ghr -u aktsk v${VERSION} ./pkg/dist/v${VERSION}
bump:
@sh -c "'$(CURDIR)/scripts/bump.sh'"