summaryrefslogtreecommitdiff
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
parentf30a39806c54459aedafdc8c6a7d91bfed7f3036 (diff)
downloadrockbox-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
-rw-r--r--apps/misc.c2
-rw-r--r--manual/Makefile1
-rw-r--r--manual/intro/main.tex6
-rwxr-xr-xtools/configure2
-rwxr-xr-xtools/release12
-rwxr-xr-xtools/svnversion.sh25
6 files changed, 44 insertions, 4 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 15e1a72..09a7c2e 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -815,7 +815,7 @@ int show_logo( void )
lcd_clear_display();
lcd_double_height(true);
lcd_puts(0, 0, rockbox);
- lcd_puts(0, 1, appsversion);
+ lcd_puts_scroll(0, 1, appsversion);
#endif
return 0;
diff --git a/manual/Makefile b/manual/Makefile
index c55ff12..19a5d3d 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -16,6 +16,7 @@ manual-prep: rockbox.tex
@mkdir -p $(OBJDIR)
@find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
@find * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
+ @../tools/svnversion.sh > version.tex
@perl credits.pl < ../docs/CREDITS | iconv -f utf-8 -t iso-8859-1 > $(OBJDIR)/CREDITS.tex
@echo "\newcommand{\platform}{${MANUALDEV}}" > $(OBJDIR)/rockbox-build.tex
@echo "\newcommand{\buildversion}{$(VERSION)}" >> $(OBJDIR)/rockbox-build.tex
diff --git a/manual/intro/main.tex b/manual/intro/main.tex
index c41a6ea..6eceaca 100644
--- a/manual/intro/main.tex
+++ b/manual/intro/main.tex
@@ -7,7 +7,7 @@
% \/ \/ \/ \/ \/
% - M A N U A L -
%
-% $Id:$
+% $Id$
%
% Copyright (C) 2006 The Rockbox Manual Team
%
@@ -44,6 +44,10 @@ contributors.
\copyright~2004 Christi Alice Scarborough,
\copyright~2003 Jos\'{e} Maria Garcia-Valdecasas Bernal \& Peter Schlenker.
\end{quote}
+\vspace{3mm}
+\begin{center}
+\IfFileExists{version.tex}{Build with \LaTeX{} from version \input{version.tex}}{}
+\end{center}
\vspace{\fill}
\begin{quote}
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
+