1
1
$ErrorActionPreference = " Stop"
2
2
3
- function DownloadWithRetry ([string ] $url , [string ] $downloadLocation , [int ] $retries )
3
+ function DownloadWithRetry ([string ] $url , [string ] $downloadLocation , [int ] $retries )
4
4
{
5
5
while ($true )
6
6
{
@@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret
19
19
Start-Sleep - Seconds 10
20
20
21
21
}
22
- else
22
+ else
23
23
{
24
24
$exception = $_.Exception
25
25
throw $exception
@@ -33,7 +33,7 @@ cd $PSScriptRoot
33
33
$repoFolder = $PSScriptRoot
34
34
$env: REPO_FOLDER = $repoFolder
35
35
36
- $koreBuildZip = " https://github.com/aspnet/KoreBuild/archive/feature/msbuild .zip"
36
+ $koreBuildZip = " https://github.com/aspnet/KoreBuild/archive/dev .zip"
37
37
if ($env: KOREBUILD_ZIP )
38
38
{
39
39
$koreBuildZip = $env: KOREBUILD_ZIP
@@ -43,18 +43,18 @@ $buildFolder = ".build"
43
43
$buildFile = " $buildFolder \KoreBuild.ps1"
44
44
45
45
if (! (Test-Path $buildFolder )) {
46
- Write-Host " Downloading KoreBuild from $koreBuildZip "
47
-
46
+ Write-Host " Downloading KoreBuild from $koreBuildZip "
47
+
48
48
$tempFolder = $env: TEMP + " \KoreBuild-" + [guid ]::NewGuid()
49
49
New-Item - Path " $tempFolder " - Type directory | Out-Null
50
50
51
51
$localZipFile = " $tempFolder \korebuild.zip"
52
-
52
+
53
53
DownloadWithRetry - url $koreBuildZip - downloadLocation $localZipFile - retries 6
54
54
55
55
Add-Type - AssemblyName System.IO.Compression.FileSystem
56
56
[System.IO.Compression.ZipFile ]::ExtractToDirectory($localZipFile , $tempFolder )
57
-
57
+
58
58
New-Item - Path " $buildFolder " - Type directory | Out-Null
59
59
copy-item " $tempFolder \**\build\*" $buildFolder - Recurse
60
60
@@ -64,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
64
64
}
65
65
}
66
66
67
- & " $buildFile " $ args
67
+ & " $buildFile " @ args
0 commit comments