[Box Backup-dev] COMMIT r492 - in box/trunk: . infrastructure
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 23 Feb 2006 20:21:12 +0000 (GMT)
Author: ben
Date: 2006-02-23 20:21:11 +0000 (Thu, 23 Feb 2006)
New Revision: 492
Modified:
box/trunk/VERSION.txt
box/trunk/infrastructure/BoxPlatform.pm.in
Log:
Let's use directory and SVN version in our BOX_VERSION variable
Modified: box/trunk/VERSION.txt
===================================================================
--- box/trunk/VERSION.txt 2006-02-23 19:51:25 UTC (rev 491)
+++ box/trunk/VERSION.txt 2006-02-23 20:21:11 UTC (rev 492)
@@ -1,2 +1,2 @@
-0.09_trunk
+USE_SVN_VERSION
boxbackup
Modified: box/trunk/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/trunk/infrastructure/BoxPlatform.pm.in 2006-02-23 19:51:25 UTC (rev 491)
+++ box/trunk/infrastructure/BoxPlatform.pm.in 2006-02-23 20:21:11 UTC (rev 492)
@@ -34,6 +34,27 @@
$product_name = <VERSION>;
chomp $product_name;
close VERSION;
+ if($product_version eq 'USE_SVN_VERSION')
+ {
+ # for developers, use SVN version
+ my $svnversion = `svnversion .`;
+ chomp $svnversion;
+ $svnversion =~ tr/0-9A-Za-z/_/c;
+ open INFO,'svn info . |';
+ my $svnurl;
+ while(<INFO>)
+ {
+ if(m/^URL: (.+?)[\n\r]+/)
+ {
+ $svnurl = $1
+ }
+ }
+ close INFO;
+ $svnurl =~ m!box/(.+)$!;
+ my $svndir = $1;
+ $svndir =~ tr/0-9A-Za-z/_/c;
+ $product_version = $svndir.'_'.$svnversion;
+ }
# where to put the files
$install_into_dir = '@bindir_expanded@';