diff --git a/.gitignore b/.gitignore index 4ede8b4a..6289e42c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .deps +.version +.version.date Makefile Makefile.in aclocal.m4 diff --git a/Makefile.am b/Makefile.am index 316d9855..bf61306d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,7 @@ ACLOCAL_AMFLAGS = -I config # extra files to include with distribution tarball EXTRA_DIST = bootstrap.sh LICENSE README-Xen Changelog kernel \ python-prefix.py revision.sh \ + .version .version.date \ packaging/bsd \ packaging/deb/compat \ packaging/deb/copyright \ @@ -70,3 +71,9 @@ core-restart: daemon/sbin/core-cleanup rm -f /var/log/core-daemon.log /etc/init.d/core-daemon start + +.version: + echo $(CORE_VERSION) > $@ + +.version.date: + echo $(CORE_VERSION_DATE) > $@ diff --git a/revision.sh b/revision.sh index 3cf1acd0..661506fe 100755 --- a/revision.sh +++ b/revision.sh @@ -44,7 +44,11 @@ esac _revision() { - echo $1$2 + if [ -r .version ]; then + cat .version + else + echo $1$2 + fi } git_revision() @@ -124,7 +128,11 @@ svn_revision() _date() { - date '+%Y%m%d' + if [ -r .version.date ]; then + cat .version.date + else + date '+%Y%m%d' + fi } git_date()