From aedec81ece3b18f7c593139165879054bf25df46 Mon Sep 17 00:00:00 2001 From: Ben Summers Date: Thu, 23 Feb 2006 20:21:11 +0000 Subject: Let's use directory and SVN version in our BOX_VERSION variable --- infrastructure/BoxPlatform.pm.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'infrastructure/BoxPlatform.pm.in') diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in index 9567d585..04e6cda4 100644 --- a/infrastructure/BoxPlatform.pm.in +++ b/infrastructure/BoxPlatform.pm.in @@ -34,6 +34,27 @@ BEGIN $product_name = ; 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() + { + 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@'; -- cgit v1.2.3