This repository has been archived on 2022-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
userausfall/make.d/release.mk

22 lines
707 B
Makefile
Raw Normal View History

.PHONY: release-ready
release-ready:
@[ -n "$$(git status --porcelain)" ] && echo "working directory must be clean for release" >&2 && exit 1
true
# $(MAKE) test
release-major: BUMP=major
release-minor: BUMP=minor
release-patch: BUMP=patch
.PHONY: release-major release-minor release-patch
release-major release-minor release-patch: release-generic
.PHONY: release-generic
.ONESHELL:
release-generic: release-ready
CURRENT_VERSION="$$(bumpversion --no-commit --no-tag $(BUMP) && cat VERSION)"
debchange --newversion "$${CURRENT_VERSION}-1" "New upstream release"
debchange --release ""
git commit -a -m "Release $${CURRENT_VERSION}"
git tag -m "Release $${CURRENT_VERSION}" "v$${CURRENT_VERSION}"