diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-05-16 11:54:21 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-05-16 11:54:21 +0000 |
commit | 8a054b6f2ca4343668b670b6fd2825563704975e (patch) | |
tree | 3440377a691551cea85372ed27372a3b235ca5e2 /infrastructure/BoxPlatform.pm.in | |
parent | 53146b1baa5517621177d380bb31021b497f1968 (diff) |
Include full platform name in parcels, to distinguish 64-bit builds.
Diffstat (limited to 'infrastructure/BoxPlatform.pm.in')
-rw-r--r-- | infrastructure/BoxPlatform.pm.in | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in index 23054565..78675325 100644 --- a/infrastructure/BoxPlatform.pm.in +++ b/infrastructure/BoxPlatform.pm.in @@ -82,19 +82,30 @@ BEGIN if($product_version =~ /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>) + my $svnversion = 'unknown'; + my $svnurl = 'unknown'; + + if(-d '.svn') { - if(m/^URL: (.+?)[\n\r]+/) + my $svnversion = `svnversion .`; + chomp $svnversion; + $svnversion =~ tr/0-9A-Za-z/_/c; + open INFO,'svn info . |'; + while(<INFO>) { - $svnurl = $1 + if(m/^URL: (.+?)[\n\r]+/) + { + $svnurl = $1 + } } + close INFO; + } + elsif(-d '.git') + { + $svnversion = `git svn info | grep '^Revision:' | cut -d' ' -f2`; + chomp $svnversion; + $svnurl = `git svn info --url`; } - close INFO; my $svndir; if ($svnurl =~ m!/box/(.+)$!) @@ -158,7 +169,7 @@ sub make_flag sub parcel_root { - my $tos = $_[1] || $ac_target_os; + my $tos = $_[1] || $ac_target; return $product_name.'-'.$product_version.'-'.$_[0].'-'.$tos; } |