diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-01-22 23:09:07 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-01-22 23:09:07 +0000 |
| commit | ea37d4c0729057b01c0e0b82b3bef7030379da2f (patch) | |
| tree | cf666f91059de5c07928de6b4b67b636742f64f2 /tools | |
| parent | f30a39806c54459aedafdc8c6a7d91bfed7f3036 (diff) | |
| download | rockbox-ea37d4c0729057b01c0e0b82b3bef7030379da2f.zip rockbox-ea37d4c0729057b01c0e0b82b3bef7030379da2f.tar.gz rockbox-ea37d4c0729057b01c0e0b82b3bef7030379da2f.tar.bz2 rockbox-ea37d4c0729057b01c0e0b82b3bef7030379da2f.tar.xz | |
Use the svn revision number for version information too, version string is now "r<revision>-<builddate> unless there is a static version file (e.g. created by tools/release).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12090 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/configure | 2 | ||||
| -rwxr-xr-x | tools/release | 12 | ||||
| -rwxr-xr-x | tools/svnversion.sh | 25 |
3 files changed, 37 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure index 26d4140..174beed 100755 --- a/tools/configure +++ b/tools/configure @@ -1579,7 +1579,7 @@ export OBJDIR=@PWD@ export BUILDDIR=@PWD@ export LANGUAGE=@LANGUAGE@ export MEMORYSIZE=@MEMORY@ -export VERSION=\$(shell date -u +%y%m%d-%H%M) +export VERSION=\$(shell \$(TOOLSDIR)/svnversion.sh \$(ROOTDIR)) export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') export MKFIRMWARE=@TOOL@ export BMP2RB_MONO=@BMP2RB_MONO@ diff --git a/tools/release b/tools/release index 1a0b245..3c5d503 100755 --- a/tools/release +++ b/tools/release @@ -11,6 +11,10 @@ if(!-f "apps/version.h") { print "run this script in the root dir\n"; exit; } +# save the complete version string for VERSION file, +# strip everything after space / hyphen for filename +$longversion = $ARGV[0]; +$version =~ s/[ -].+//; # -L allows find to follow symbolic links @files=`find -L . -name FILES`; @@ -84,7 +88,6 @@ for(@entries) { `cp -p $_ $dir 2>/dev/null`; } - if(!open(VERSION, "<apps/version.h")) { print "Can't read version.h\n"; exit; @@ -101,5 +104,12 @@ while(<VERSION>) { close(VERSION); close(THIS); +if(!open(VER, ">rockbox-$version/docs/VERSION")) { + print "Can't create new docs/VERSION file\n"; + exit; +} +print VER $version; +close(VER); + `tar -cjf rockbox-$version.tar.bz2 rockbox-$version`; `rm -rf rockbox-$version`; diff --git a/tools/svnversion.sh b/tools/svnversion.sh new file mode 100755 index 0000000..5e96bf9 --- /dev/null +++ b/tools/svnversion.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id:$ +# + +# Usage: svnversion.sh [source-root] + +VERSIONFILE=docs/VERSION +if [ -n "$1" ]; then TOP=$1; else TOP=..; fi +if [ -r $TOP/$VERSIONFILE ]; then SVNVER=`cat $TOP/$VERSIONFILE`; +else if [ `which svnversion 2>/dev/null` ]; + then SVNVER=r`svnversion $1`; + if [ $SVNVER = "rexported" ]; then + SVNVER=unknown; + fi +else SVNVER="unknown"; fi +fi +VERSION=$SVNVER-`date -u +%y%m%d` +echo $VERSION + |