-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (18 loc) · 698 Bytes
/
Makefile
File metadata and controls
25 lines (18 loc) · 698 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
VERSION := $(shell git describe --tags)
_bin/release-request: *.go
go generate
go build -o _bin/release-request -ldflags="-X main.Version=$(VERSION)"
.PHONY: clean install get-deps test build
test:
go test -v -race
go vet
clean:
rm -Rf _bin/* _artifacts/*
install: _bin/release-request
install _bin/release-request $(GOPATH)/bin
build: clean test
go generate
gox -output "_artifacts/{{.Dir}}-{{.OS}}-{{.Arch}}-${VERSION}/release-request" -arch="amd64" -os "darwin" -os "windows" -os "linux" -ldflags "-w -s -X main.Version=$(VERSION)"
cd _artifacts/ && find . -name 'release-request*' -type d | sed 's/\.\///' | xargs -I{} zip -m -q -r {}.zip {}
release:
ghr ${VERSION} _artifacts