diff options
author | Ben Summers <ben@fluffy.co.uk> | 2006-02-23 20:21:11 +0000 |
---|---|---|
committer | Ben Summers <ben@fluffy.co.uk> | 2006-02-23 20:21:11 +0000 |
commit | aedec81ece3b18f7c593139165879054bf25df46 (patch) | |
tree | fb9f94504c511687f9016650c3dc7479e7fcf393 /infrastructure/BoxPlatform.pm.in | |
parent | 4c9b8152c1f38d4b0a81cac02bd7e941936b644e (diff) |
Let's use directory and SVN version in our BOX_VERSION variable
Diffstat (limited to 'infrastructure/BoxPlatform.pm.in')
-rw-r--r-- | infrastructure/BoxPlatform.pm.in | 21 |
1 files changed, 21 insertions, 0 deletions
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 = <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@'; |