]> granicus.if.org Git - graphviz/commitdiff
have builder autdetect stable releases
authorJohn Ellson <ellson@research.att.com>
Mon, 7 Oct 2013 20:50:58 +0000 (16:50 -0400)
committerJohn Ellson <ellson@research.att.com>
Mon, 7 Oct 2013 20:50:58 +0000 (16:50 -0400)
autogen.sh
builder.sh
configure.ac

index 2e2fd7953cf6e0b12c47eb7308ab3952ea77de43..47b18b5279f4c9026056f03c342c37545aca12b1 100755 (executable)
@@ -26,7 +26,8 @@ m4_define(graphviz_version_minor, 35)
 dnl NB: the next line gets changed to a date/time string for development releases
 m4_define(graphviz_version_micro, 0)
 m4_define(graphviz_version_date, $GRAPHVIZ_VERSION_DATE)
-m4_define(graphviz_collection, stable)
+m4_define(graphviz_collection, test)
+m4_define(graphviz_version_commit, unknown)
 EOF
 
 autoreconf -v --install --force || exit 1
index bf30a6b35201d4748c0fc4ee7600843f92ebf12a..a0131c002c2f285d6a9265bfacaa8fda3c703942 100755 (executable)
@@ -22,7 +22,7 @@ git pull
 git log -1 --date raw |
 while read a b c; do
     case "$a" in
-    commit) COMMIT=$b;;
+    commit) VERSION_COMMIT=$b;;
     Date:) EPOCHSEC=$b; TZ=$c; break;;
     *) continue;;
     esac
@@ -35,14 +35,20 @@ VERSION_MAJOR=`grep 'm4_define(graphviz_version_major' version.m4 | sed 's/.*, \
 VERSION_MINOR=`grep 'm4_define(graphviz_version_minor' version.m4 | sed 's/.*, \([0-9]*\))/\1/'`
 VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_DATE
 
+if test $(( $VERSION_MINOR % 2 )) -eq 0; then
+    VERSION_COLLECTION="stable"
+else
+    VERSION_COLLECTION="development"
+fi
+
 sed "s/\(m4_define(graphviz_version_micro, \).*)/\1$VERSION_DATE)/" <version.m4 >t$$
 mv t$$ version.m4
-sed "s/\(m4_define(graphviz_collection, \).*)/\1development)/" <version.m4 >t$$
+sed "s/\(m4_define(graphviz_collection, \).*)/\1$VERSION_COLLECTION)/" <version.m4 >t$$
 mv t$$ version.m4
 sed "s/\(m4_define(graphviz_version_date, \).*)/\1$VERSION_DATE)/" <version.m4 >t$$
 mv t$$ version.m4
-
-exit
+sed "s/\(m4_define(graphviz_version_commit, \).*)/\1$VERSION_COMMIT)/" <version.m4 >t$$
+mv t$$ version.m4
 
 ./configure >/dev/null
 
index 6b09635bffa6b2ae6ed02cc277803f00427c386d..9af1bd7597a0e5ae631708058e545c5470186566 100644 (file)
@@ -10,6 +10,7 @@ AC_PREREQ(2.61)
 #      graphviz_version_micro
 #      graphviz_collection
 #      graphviz_version_date
+#      graphviz_version_commit
 m4_include(./version.m4)
 
 AC_INIT([graphviz],[graphviz_version_major.graphviz_version_minor.graphviz_version_micro],[http://www.graphviz.org/])
@@ -24,12 +25,16 @@ GRAPHVIZ_COLLECTION=graphviz_collection()
 #NB: date/time of last commit - or "now"
 GRAPHVIZ_VERSION_DATE=graphviz_version_date()
 
+#NB: git commit hash of last commit
+GRAPHVIZ_VERSION_COMMIT=graphviz_version_commit()
+
 GRAPHVIZ_SOURCES=graphviz/$GRAPHVIZ_COLLECTION/SOURCES
 
 AC_SUBST([GRAPHVIZ_VERSION_MAJOR])
 AC_SUBST([GRAPHVIZ_VERSION_MINOR])
 AC_SUBST([GRAPHVIZ_VERSION_MICRO])
 AC_SUBST([GRAPHVIZ_VERSION_DATE])
+AC_SUBST([GRAPHVIZ_VERSION_COMMIT])
 AC_SUBST([GRAPHVIZ_COLLECTION])
 AC_SUBST([GRAPHVIZ_SOURCES])