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.tar.gz rockbox-ea37d4c0729057b01c0e0b82b3bef7030379da2f.zip |
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 26d41404c6..174beed644 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -1579,7 +1579,7 @@ export OBJDIR=@PWD@ | |||
1579 | export BUILDDIR=@PWD@ | 1579 | export BUILDDIR=@PWD@ |
1580 | export LANGUAGE=@LANGUAGE@ | 1580 | export LANGUAGE=@LANGUAGE@ |
1581 | export MEMORYSIZE=@MEMORY@ | 1581 | export MEMORYSIZE=@MEMORY@ |
1582 | export VERSION=\$(shell date -u +%y%m%d-%H%M) | 1582 | export VERSION=\$(shell \$(TOOLSDIR)/svnversion.sh \$(ROOTDIR)) |
1583 | export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') | 1583 | export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') |
1584 | export MKFIRMWARE=@TOOL@ | 1584 | export MKFIRMWARE=@TOOL@ |
1585 | export BMP2RB_MONO=@BMP2RB_MONO@ | 1585 | export BMP2RB_MONO=@BMP2RB_MONO@ |
diff --git a/tools/release b/tools/release index 1a0b245a2f..3c5d5037fe 100755 --- a/tools/release +++ b/tools/release | |||
@@ -11,6 +11,10 @@ if(!-f "apps/version.h") { | |||
11 | print "run this script in the root dir\n"; | 11 | print "run this script in the root dir\n"; |
12 | exit; | 12 | exit; |
13 | } | 13 | } |
14 | # save the complete version string for VERSION file, | ||
15 | # strip everything after space / hyphen for filename | ||
16 | $longversion = $ARGV[0]; | ||
17 | $version =~ s/[ -].+//; | ||
14 | 18 | ||
15 | # -L allows find to follow symbolic links | 19 | # -L allows find to follow symbolic links |
16 | @files=`find -L . -name FILES`; | 20 | @files=`find -L . -name FILES`; |
@@ -84,7 +88,6 @@ for(@entries) { | |||
84 | `cp -p $_ $dir 2>/dev/null`; | 88 | `cp -p $_ $dir 2>/dev/null`; |
85 | } | 89 | } |
86 | 90 | ||
87 | |||
88 | if(!open(VERSION, "<apps/version.h")) { | 91 | if(!open(VERSION, "<apps/version.h")) { |
89 | print "Can't read version.h\n"; | 92 | print "Can't read version.h\n"; |
90 | exit; | 93 | exit; |
@@ -101,5 +104,12 @@ while(<VERSION>) { | |||
101 | close(VERSION); | 104 | close(VERSION); |
102 | close(THIS); | 105 | close(THIS); |
103 | 106 | ||
107 | if(!open(VER, ">rockbox-$version/docs/VERSION")) { | ||
108 | print "Can't create new docs/VERSION file\n"; | ||
109 | exit; | ||
110 | } | ||
111 | print VER $version; | ||
112 | close(VER); | ||
113 | |||
104 | `tar -cjf rockbox-$version.tar.bz2 rockbox-$version`; | 114 | `tar -cjf rockbox-$version.tar.bz2 rockbox-$version`; |
105 | `rm -rf rockbox-$version`; | 115 | `rm -rf rockbox-$version`; |
diff --git a/tools/svnversion.sh b/tools/svnversion.sh new file mode 100755 index 0000000000..5e96bf925c --- /dev/null +++ b/tools/svnversion.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/bash | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # $Id:$ | ||
9 | # | ||
10 | |||
11 | # Usage: svnversion.sh [source-root] | ||
12 | |||
13 | VERSIONFILE=docs/VERSION | ||
14 | if [ -n "$1" ]; then TOP=$1; else TOP=..; fi | ||
15 | if [ -r $TOP/$VERSIONFILE ]; then SVNVER=`cat $TOP/$VERSIONFILE`; | ||
16 | else if [ `which svnversion 2>/dev/null` ]; | ||
17 | then SVNVER=r`svnversion $1`; | ||
18 | if [ $SVNVER = "rexported" ]; then | ||
19 | SVNVER=unknown; | ||
20 | fi | ||
21 | else SVNVER="unknown"; fi | ||
22 | fi | ||
23 | VERSION=$SVNVER-`date -u +%y%m%d` | ||
24 | echo $VERSION | ||
25 | |||