summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-10-20 11:49:03 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-10-20 13:09:27 -1000
commit844c4aa143069535a26add515a0a32a2c913c2a1 (patch)
treedf6960381c7d08bf21d0750ad4d4dc7c61d5dcf9
parent58823e98bd6d6dbc8372816ddff29267bcad526b (diff)
downloadanaconda-844c4aa143069535a26add515a0a32a2c913c2a1.tar.gz
anaconda-844c4aa143069535a26add515a0a32a2c913c2a1.tar.xz
anaconda-844c4aa143069535a26add515a0a32a2c913c2a1.zip
Handle more than x.y version numbers in 'make bumpver'.
For the rhel6-branch, we now have an x.y.z version number since it was branched from f12-branch. The bumpver target needs to handle the extra .z component.
-rw-r--r--Makefile.am6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index e06a7ce01..79b43e581 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -117,8 +117,10 @@ rpmlog:
grep -v -- "- Sending translation for "
bumpver:
- @NEWSUBVER=$$((`echo $(PACKAGE_VERSION) |cut -d . -f 2` + 1)) ; \
- NEWVERSION=`echo $(PACKAGE_VERSION).$$NEWSUBVER |cut -d . -f 1,3` ; \
+ @LAST=$$(echo $(PACKAGE_VERSION) | grep "\." -o | wc -l) ; \
+ FIELD=$$(($${LAST} + 1)) ; \
+ NEWSUBVER=$$((`echo $(PACKAGE_VERSION) | cut -d . -f $${FIELD}` + 1)) ; \
+ NEWVERSION="`echo $(PACKAGE_VERSION) | cut -d . -f 1-$${LAST}`.$$NEWSUBVER" ; \
DATELINE="* `date "+%a %b %d %Y"` `git config user.name` <`git config user.email`> - $$NEWVERSION-1" ; \
cl=`grep -n %changelog anaconda.spec.in |cut -d : -f 1` ; \
tail --lines=+$$(($$cl + 1)) anaconda.spec.in > speclog ; \