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 | |
parent | 4c9b8152c1f38d4b0a81cac02bd7e941936b644e (diff) |
Let's use directory and SVN version in our BOX_VERSION variable
-rw-r--r-- | VERSION.txt | 2 | ||||
-rw-r--r-- | infrastructure/BoxPlatform.pm.in | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/VERSION.txt b/VERSION.txt index a71950fa..c29321a1 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -0.09_trunk +USE_SVN_VERSION boxbackup 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@'; |