From: John Ellson Date: Mon, 7 Oct 2013 20:50:58 +0000 (-0400) Subject: have builder autdetect stable releases X-Git-Tag: LAST_LIBGRAPH~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0320da255c9f94f174ecff5fd6341d49f7f0dbc;p=graphviz have builder autdetect stable releases --- diff --git a/autogen.sh b/autogen.sh index 2e2fd7953..47b18b527 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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 diff --git a/builder.sh b/builder.sh index bf30a6b35..a0131c002 100755 --- a/builder.sh +++ b/builder.sh @@ -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)/" t$$ mv t$$ version.m4 -sed "s/\(m4_define(graphviz_collection, \).*)/\1development)/" t$$ +sed "s/\(m4_define(graphviz_collection, \).*)/\1$VERSION_COLLECTION)/" t$$ mv t$$ version.m4 sed "s/\(m4_define(graphviz_version_date, \).*)/\1$VERSION_DATE)/" t$$ mv t$$ version.m4 - -exit +sed "s/\(m4_define(graphviz_version_commit, \).*)/\1$VERSION_COMMIT)/" t$$ +mv t$$ version.m4 ./configure >/dev/null diff --git a/configure.ac b/configure.ac index 6b09635bf..9af1bd759 100644 --- a/configure.ac +++ b/configure.ac @@ -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])