Skip to content

Commit ae1a287

Browse files
authored
Merge pull request #916 from Unity-Technologies/unity-master-7z
Produce 7z archive in addition to zip
2 parents 8b2341a + 27083f9 commit ae1a287

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

external/buildscripts/collect_allbuilds.pl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
use lib ('external/buildscripts/perl_lib');
2+
use Cwd 'abs_path';
3+
use File::Basename;
24
use File::Copy::Recursive qw(dircopy rmove);
35
use File::Path;
46
use Tools qw(InstallNameTool);
57

8+
9+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
10+
my $monoroot = abs_path($monoroot);
11+
612
my $path = "incomingbuilds/";
713

814
rmtree("collectedbuilds");
@@ -44,3 +50,17 @@
4450
close(MYFILE);
4551

4652
system("zip -r builds.zip *") eq 0 or die("failed zipping up builds");
53+
54+
if($^O eq "linux")
55+
{
56+
system("$monoroot/../../mono-build-deps/build/7z/linux64/7za a builds.7z * -x!builds.zip") eq 0 or die("failed 7z up builds");
57+
}
58+
elsif($^O eq 'darwin')
59+
{
60+
system("$monoroot/../../mono-build-deps/build/7z/osx/7za a builds.7z * -x!builds.zip") eq 0 or die("failed 7z up builds");
61+
}
62+
else
63+
{
64+
die("Unsupported platform for build collection.")
65+
}
66+

0 commit comments

Comments
 (0)