-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
20 lines (15 loc) · 703 Bytes
/
Makefile
File metadata and controls
20 lines (15 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# go run -ldflags "-X github.com/nshttpd/oci-api-keygen/cmd.version=1.0.1-BETA -X github.com/nshttpd/oci-api-keygen/cmd.shortSha=`git rev-parse HEAD`" main.go version
VERSION=`cat VERSION`
SHORTSHA=`git rev-parse --short HEAD`
LDFLAGS=-X github.com/nshttpd/oci-api-keygen/cmd.version=$(VERSION)
LDFLAGS+=-X github.com/nshttpd/oci-api-keygen/cmd.shortSha=$(SHORTSHA)
build:
go build -ldflags "$(LDFLAGS)" .
utils:
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
deploy: utils
pwd
ls
gox -parallel=4 -ldflags "$(LDFLAGS)" -output "dist/oci-api-keygen_{{.OS}}_{{.Arch}}"
ghr -t $(GITHUB_TOKEN) -u $(CIRCLE_PROJECT_USERNAME) -r $(CIRCLE_PROJECT_REPONAME) --replace $(VERSION) dist/