[Ovirt-devel] [PATCH] Adds bumpversion to Makefiles to autoincrement version by 0.01
Perry Myers
pmyers at redhat.com
Sun Jun 15 00:39:48 UTC 2008
Also adds call to build-all.sh so that on each invocation the
version file is checked out from the repository prior to calling
make bumpversion and make bumpgit.
Signed-off-by: Perry Myers <pmyers at redhat.com>
---
build-all.sh | 2 ++
ovirt-host-creator/Makefile | 4 ++++
wui/Makefile | 3 +++
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/build-all.sh b/build-all.sh
index ad3317b..f1d07d8 100755
--- a/build-all.sh
+++ b/build-all.sh
@@ -44,7 +44,9 @@ EOF
}
bumpver() {
+ git checkout version
if [[ "$version_type" == "git" ]]; then
+ make bumpversion
make bumpgit
elif [[ "$version_type" == "release" ]]; then
make bumprelease
diff --git a/ovirt-host-creator/Makefile b/ovirt-host-creator/Makefile
index 6c76144..b7d98ec 100644
--- a/ovirt-host-creator/Makefile
+++ b/ovirt-host-creator/Makefile
@@ -1,4 +1,5 @@
VERSION = $(shell echo `awk '{ print $$1 }' version`)
+NEWVERSION = $(shell printf "%.2f" `dc -e "$(VERSION) .01 + p"`)
RELEASE = $(shell echo `awk '{ print $$2 }' version`)
NEWRELEASE = $(shell echo $$(($(RELEASE) + 1)))
X = $(shell echo `awk '{ if (split($$2,r,".") >= 2) { if (r[1]=="0") {print r[2]+1} else print 1 } else print 1 }' version`)
@@ -29,6 +30,9 @@ bumprelease:
setversion:
-echo "$(VERSION) $(RELEASE)" > version
+bumpversion:
+ -echo "$(NEWVERSION) 0" > version
+
clean:
-rm -rf ovirt-host-image-* ovirt-pxe.log
diff --git a/wui/Makefile b/wui/Makefile
index 3c0ba94..eede4d6 100644
--- a/wui/Makefile
+++ b/wui/Makefile
@@ -1,4 +1,5 @@
VERSION = $(shell echo `awk '{ print $$1 }' version`)
+NEWVERSION = $(shell printf "%.2f" `dc -e "$(VERSION) .01 + p"`)
RELEASE = $(shell echo `awk '{ print $$2 }' version`)
NEWRELEASE = $(shell echo $$(($(RELEASE) + 1)))
X = $(shell echo `awk '{ if (split($$2,r,".") >= 2) { if (r[1]=="0") {print r[2]+1} else print 1 } else print 1 }' version`)
@@ -31,6 +32,8 @@ bumprelease:
setversion:
-echo "$(VERSION) $(RELEASE)" > version
+bumpversion:
+ -echo "$(NEWVERSION) 0" > version
clean:
-rm -f ovirt*.gz ovirt*.rpm
--
1.5.5.1
More information about the ovirt-devel
mailing list