From: Michal Minar Date: Tue, 25 Feb 2014 08:22:47 +0000 (+0100) Subject: do not use release in tag names in master branch X-Git-Tag: hwdata-0.261~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e0b5582eff8a6a7b3d34d12ae16a21d29f0827c;p=oweals%2Fhwdata.git do not use release in tag names in master branch Releases are useful to have only in rhel branches. Master branch which is used as a source for Fedora and other distributions does not need them. They are in fact excessive. Stripping them off makes the tarballs consistent with other upstream projects. --- diff --git a/Makefile b/Makefile index 810c9d7..f71a416 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ NAME=hwdata VERSION=$(shell awk '/Version:/ { print $$2 }' hwdata.spec) RELEASE=$(shell rpm -q --define 'dist %{nil}' --specfile --qf "%{release}" hwdata.spec) +ifeq ($(shell git rev-parse --abbrev-ref HEAD | sed -n 's/^\([^-]\+\).*/\1/p'), rhel) + # add revision to tag name for rhel branches + TAGNAME := $(NAME)-$(VERSION)-$(REVISION) +else + TAGNAME := $(NAME)-$(VERSION) +endif SOURCEDIR := $(shell pwd) CVSROOT = $(shell cat CVS/Root 2>/dev/null || :) @@ -33,12 +39,12 @@ commit: git commit -a ||: tag: - @git tag -s -m "Tag as $(NAME)-$(VERSION)-$(RELEASE)" $(NAME)-$(VERSION)-$(RELEASE) - @echo "Tagged as $(NAME)-$(VERSION)-$(RELEASE)" + @git tag -s -m "Tag as $(TAGNAME)" $(TAGNAME) + @echo "Tagged as $(TAGNAME)" force-tag: - @git tag -f $(NAME)-$(VERSION)-$(RELEASE) - @echo "Tag forced as $(NAME)-$(VERSION)-$(RELEASE)" + @git tag -s -f $(TAGNAME) + @echo "Tag forced as $(TAGNAME)" changelog: @rm -f ChangeLog