diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index 94fb35bd..1de40c84 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,6 @@ NAME = sos VERSION = $(shell grep -e 'version = ' setup.py |cut -d \' -f 2) REPO = https://sos.108.redhat.com/svn/sos SVNTAG = r$(subst .,-,$(VERSION)) -SVN_TAG_CONTENTS := $(shell svn list $(REPO)/tags/$(SVNTAG)/Makefile) all: @@ -14,14 +13,14 @@ all: .PHONY: tag-release tarball release install version clean tag-release: -ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) - @echo "The repository already contains a tag for version $(VERSION)" - @exit 1 -else + @svn list $(REPO)/tags/$(SVNTAG)/Makefile > /dev/null && \ + ( \ + echo "The repository already contains a tag for version $(VERSION)"; \ + exit 1; \ + ) @svn copy $(REPO)/trunk/src $(REPO)/tags/$(SVNTAG) \ -m "Tagging the $(SVNTAG) release of the sos project" @echo "Tagged as $(SVNTAG)" -endif # if we don't compress them, rpmbuild does, and this breaks things manpages: sosreport.1 @@ -42,7 +41,11 @@ tarball: clean manpages @echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2." release: clean manpages -ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) + @svn list $(REPO)/tags/$(SVNTAG)/Makefile > /dev/null && \ + ( \ + @echo "There is no tag in the repository for this version, must be tagged before release"; \ + exit 1; \ + ) @echo "Creating an archive from tag $(SVNTAG)" @rm -rf /tmp/$(NAME) @svn export -q $(REPO)/tags/$(SVNTAG) /tmp/$(NAME) \ @@ -55,9 +58,6 @@ ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) @rm -f /tmp/$(NAME)-$(VERSION).tar.bz2 @echo " " @echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2." -else - @echo "There is no tag in the repository for this version, must be tagged before release" -endif install: python setup.py install |