forked from blacktop/go-arm64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 loc) · 1.09 KB
/
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
REPO=blacktop
NAME=go-arch64
VERSION=$(shell gh release list -L 1 | cut -f1)
NEXT_VERSION=$(shell $(PWD)/.hack/bump/version -p $(VERSION))
GIT_COMMIT=$(git rev-parse HEAD)
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
GIT_DESCRIBE=$(git describe --tags)
.PHONY: bump
bump: ## Incriment version patch number
@echo " > Bumping VERSION"
@chglog add --version ${NEXT_VERSION}
.PHONY: changelog
changelog: bump ## Create a new CHANGELOG.md
@echo " > Creating CHANGELOG.md"
@chglog format --template release > CHANGELOG.md
.PHONY: release
release: changelog ## Create a new release from the VERSION
@echo " > Creating Release"
@gh release create ${NEXT_VERSION} -F CHANGELOG.md
.PHONY: destroy
destroy: ## Remove release from the VERSION
@echo " > Deleting Release"
git tag -d v${VERSION}
git push origin :refs/tags/v${VERSION}
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help