diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2018-06-05 16:44:45 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2018-06-14 16:25:51 +0200 |
commit | 5a1369c0d0d589a948f05cf3f623f77cb42c28ea (patch) | |
tree | 4217e81f3100200b38c39b6cca1a1913f36275a4 /Makefile | |
parent | d12c5f3d31391eefaf330c9598e1195d96935025 (diff) | |
download | initscripts-5a1369c0d0d589a948f05cf3f623f77cb42c28ea.tar initscripts-5a1369c0d0d589a948f05cf3f623f77cb42c28ea.tar.gz initscripts-5a1369c0d0d589a948f05cf3f623f77cb42c28ea.tar.bz2 initscripts-5a1369c0d0d589a948f05cf3f623f77cb42c28ea.tar.xz initscripts-5a1369c0d0d589a948f05cf3f623f77cb42c28ea.zip |
Makefile: new release-commit rule added
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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 |