-
Notifications
You must be signed in to change notification settings - Fork 2
/
CloneAndBuildAllRequiredRepos.ps1
63 lines (44 loc) · 1.77 KB
/
CloneAndBuildAllRequiredRepos.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# **** READ DEPENDENCIES ARRAY ****
$depsFilePath = "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\dependencies.txt"
$dependencies = gc $depsFilePath
# **** READ INCLUDE ARRAY ****
$incFilePath = "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\include.txt"
$includes = gc $incFilePath
# **** READ UIs ARRAY ****
$uisFilePath = "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\userInterfaces.txt"
$uis = gc $uisFilePath
# **** READ ALT CONFIGS ARRAY ****
$configsFilePath = "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\altConfigs.txt"
$altconfigs = gc $configsFilePath
# **** Constants ****
$msbuildPath = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
git config --global user.email "BHoMBot@bhom.xyz"
git config --global user.name "BHoMBot"
# **** Iterate over all dependencies ****
write-Output ("**** ITERATE OVER ALL DEPENDENCIES ****")
ForEach ($repo in $dependencies)
{
& "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\CloneAndBuildRepo.ps1" -repo $repo
}
# **** Iterate over all Toolkits to Include ****
write-Output ("**** ITERATE OVER ALL TOOLKITS TO INCLUDE ****")
ForEach ($repo in $includes) {
& "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\CloneAndBuildRepo.ps1" -repo $repo
}
# **** Build Alternate Configurations ****
ForEach ($altconfig in $altconfigs)
{
$parts = $altconfig.split("/")
$org = $parts[0]
$repo = $parts[1]
$config = $parts[2]
$slnPath = "$ENV:BUILD_SOURCESDIRECTORY\$repo\$repo.sln"
write-Output ("Building " + $repo + " " + $config)
& $msbuildPath -nologo $slnPath /verbosity:minimal /p:Configuration=$config
}
# **** Iterate over all UIs ****
write-Output ("**** ITERATE OVER ALL USER INTERFACES ****")
ForEach ($repo in $uis)
{
& "$ENV:BUILD_SOURCESDIRECTORY\BHoM_Installer\CloneAndBuildRepo.ps1" -repo $repo
}