Skip to content

Commit 6049ab8

Browse files
author
Nate McMaster
committed
Change korebuild branch and fix argument forwarding in bootstrapper
1 parent 60c45c3 commit 6049ab8

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

build.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$ErrorActionPreference = "Stop"
22

3-
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
3+
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
44
{
55
while($true)
66
{
@@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret
1919
Start-Sleep -Seconds 10
2020

2121
}
22-
else
22+
else
2323
{
2424
$exception = $_.Exception
2525
throw $exception
@@ -33,7 +33,7 @@ cd $PSScriptRoot
3333
$repoFolder = $PSScriptRoot
3434
$env:REPO_FOLDER = $repoFolder
3535

36-
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip"
36+
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
3737
if ($env:KOREBUILD_ZIP)
3838
{
3939
$koreBuildZip=$env:KOREBUILD_ZIP
@@ -43,18 +43,18 @@ $buildFolder = ".build"
4343
$buildFile="$buildFolder\KoreBuild.ps1"
4444

4545
if (!(Test-Path $buildFolder)) {
46-
Write-Host "Downloading KoreBuild from $koreBuildZip"
47-
46+
Write-Host "Downloading KoreBuild from $koreBuildZip"
47+
4848
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
4949
New-Item -Path "$tempFolder" -Type directory | Out-Null
5050

5151
$localZipFile="$tempFolder\korebuild.zip"
52-
52+
5353
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
5454

5555
Add-Type -AssemblyName System.IO.Compression.FileSystem
5656
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
57-
57+
5858
New-Item -Path "$buildFolder" -Type directory | Out-Null
5959
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
6060

@@ -64,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
6464
}
6565
}
6666

67-
&"$buildFile" $args
67+
&"$buildFile" @args

build.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
33
cd $repoFolder
44

5-
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip"
5+
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
66
if [ ! -z $KOREBUILD_ZIP ]; then
77
koreBuildZip=$KOREBUILD_ZIP
88
fi
@@ -12,12 +12,12 @@ buildFile="$buildFolder/KoreBuild.sh"
1212

1313
if test ! -d $buildFolder; then
1414
echo "Downloading KoreBuild from $koreBuildZip"
15-
16-
tempFolder="/tmp/KoreBuild-$(uuidgen)"
15+
16+
tempFolder="/tmp/KoreBuild-$(uuidgen)"
1717
mkdir $tempFolder
18-
18+
1919
localZipFile="$tempFolder/korebuild.zip"
20-
20+
2121
retries=6
2222
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
2323
do
@@ -29,18 +29,18 @@ if test ! -d $buildFolder; then
2929
echo "Waiting 10 seconds before retrying. Retries left: $retries"
3030
sleep 10s
3131
done
32-
32+
3333
unzip -q -d $tempFolder $localZipFile
34-
34+
3535
mkdir $buildFolder
3636
cp -r $tempFolder/**/build/** $buildFolder
37-
37+
3838
chmod +x $buildFile
39-
39+
4040
# Cleanup
4141
if test -d $tempFolder; then
42-
rm -rf $tempFolder
42+
rm -rf $tempFolder
4343
fi
4444
fi
4545

46-
$buildFile -r $repoFolder "$@"
46+
$buildFile -r $repoFolder "$@"

0 commit comments

Comments
 (0)