summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-01-22 23:09:07 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-01-22 23:09:07 +0000
commitea37d4c0729057b01c0e0b82b3bef7030379da2f (patch)
treecf666f91059de5c07928de6b4b67b636742f64f2 /tools
parentf30a39806c54459aedafdc8c6a7d91bfed7f3036 (diff)
downloadrockbox-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-xtools/configure2
-rwxr-xr-xtools/release12
-rwxr-xr-xtools/svnversion.sh25
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@
1579export BUILDDIR=@PWD@ 1579export BUILDDIR=@PWD@
1580export LANGUAGE=@LANGUAGE@ 1580export LANGUAGE=@LANGUAGE@
1581export MEMORYSIZE=@MEMORY@ 1581export MEMORYSIZE=@MEMORY@
1582export VERSION=\$(shell date -u +%y%m%d-%H%M) 1582export VERSION=\$(shell \$(TOOLSDIR)/svnversion.sh \$(ROOTDIR))
1583export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') 1583export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1584export MKFIRMWARE=@TOOL@ 1584export MKFIRMWARE=@TOOL@
1585export BMP2RB_MONO=@BMP2RB_MONO@ 1585export 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
88if(!open(VERSION, "<apps/version.h")) { 91if(!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>) {
101close(VERSION); 104close(VERSION);
102close(THIS); 105close(THIS);
103 106
107if(!open(VER, ">rockbox-$version/docs/VERSION")) {
108 print "Can't create new docs/VERSION file\n";
109 exit;
110}
111print VER $version;
112close(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
13VERSIONFILE=docs/VERSION
14if [ -n "$1" ]; then TOP=$1; else TOP=..; fi
15if [ -r $TOP/$VERSIONFILE ]; then SVNVER=`cat $TOP/$VERSIONFILE`;
16else if [ `which svnversion 2>/dev/null` ];
17 then SVNVER=r`svnversion $1`;
18 if [ $SVNVER = "rexported" ]; then
19 SVNVER=unknown;
20 fi
21else SVNVER="unknown"; fi
22fi
23VERSION=$SVNVER-`date -u +%y%m%d`
24echo $VERSION
25