From 5a1369c0d0d589a948f05cf3f623f77cb42c28ea Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 5 Jun 2018 16:44:45 +0200 Subject: Makefile: new release-commit rule added --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ae9f571b..f42bae34 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ localstatedir = /var sharedstatedir = $(localstatedir)/lib VERSION := $(shell gawk '/Version:/ { print $$2 }' initscripts.spec) -TAG = $(VERSION) +NEXT_VERSION := $(shell gawk '/Version:/ { print $$2 + 0.01}' initscripts.spec) all: make-binaries make-translations @@ -106,8 +106,18 @@ clean: @find . -name "*~" -exec rm -v -f {} \; tag: - @git tag -a -f -m "Tag as $(TAG)" $(TAG) - @echo "Tagged as $(TAG)" + @git tag -a -f -m "Tag as $(VERSION)" $(VERSION) + @echo "Tagged as $(VERSION)" + +release-commit: + @git log --decorate=no --format="- %s" $(VERSION)..HEAD > .changelog.tmp + @rpmdev-bumpspec -n $(NEXT_VERSION) -f .changelog.tmp initscripts.spec + @rm -f .changelog.tmp + @git add initscripts.spec + @git commit --message="$(NEXT_VERSION)" + @git tag -a -f -m "Tag as $(NEXT_VERSION)" $(NEXT_VERSION) + @echo -e "\n New release commit ($(NEXT_VERSION)) created:\n" + @git show archive: clean @git archive --format=tar --prefix=initscripts-$(VERSION)/ HEAD > initscripts-$(VERSION).tar -- cgit v1.2.1