> Add the git branch to the generated version.h file. > > --- > src/Makefile.am | 18 +++++++++++------- > 1 files changed, 11 insertions(+), 7 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index a5a6c6c..6d7eb2d 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -95,17 +95,21 @@ endif > via_driver.lo: version.h > version.h: $(openchrome_drv_la_SOURCES) > @if [ -d ../.git ]; then \ > - echo '#define BUILDCOMMENT "(developement build, at revision '\ > - "`git log -1 --pretty=format:%h | head -1`"')"' > [email protected]; \ > - else \ > - if [ -d .svn ]; then \ > + echo '#define BUILDCOMMENT "(developement build, branch' \ > + "`git branch -v | sed 's/no branch/no_branch/' | \ > + awk '/^\*/ { print $$2 }'`" \ > + 'at revision' \ > + "`git log -1 --pretty=format:%h | head -1`"')"' \ > + > [email protected]; \ > + else \ > + if [ -d .svn ]; then \ > echo '#define BUILDCOMMENT "(development build, at revision '\ > "`svnversion -nc .. | sed -e s/^[^:]*://`"')"' > [email protected]; \ > - else \ > + else \ > date +'#define BUILDCOMMENT "(development build, compiled on > %c)"' \ > - > [email protected]; \ > + > [email protected]; \ > fi; \ > - fi > + fi > @chmod 666 [email protected] > @mv [email protected] $@ > -- > 1.7.6.5
One more feature should be added for the stable release suggested by Natanael is updating the PATCHLEVEL to the xorg driver by using the number of commits since last release tag: (git describe --long | cut -d- -f2) as patchlevel _______________________________________________ Openchrome-devel mailing list [email protected] http://wiki.openchrome.org/mailman/listinfo/openchrome-devel
