-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
30 lines (23 loc) · 808 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
PROJECTNAME=$(shell basename "$(PWD)")
MAKEFLAGS += --silent
## build: Builds the project binary `bin/pact-contractor`
build:
go build -o bin/$(PROJECTNAME) main.go
## run: Run given command. e.g; make run cmd="push -b my-bucket"
run:
go run main.go $(cmd)
## release: Releases new version of the binary and submits to GitHub. Remember to have the GITHUB_TOKEN env var present. Provide VERSION to set the released version. E.g. make release VERSION=v0.1.1
release:
git tag -fa $(VERSION)
git push -f origin $(VERSION)
goreleaser --rm-dist
## revert-tag: Removes tag from local and origin to reissue release again
revert-tag:
.PHONY: help
all: help
help: Makefile
@echo
@echo " Choose a command run in "$(PROJECTNAME)":"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo