Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate McMaster <nate.mcmaster@microsoft.com>2018-10-16 22:02:08 +0300
committerNate McMaster <nate.mcmaster@microsoft.com>2018-10-16 22:02:18 +0300
commita35226131a6c85c31aead764a3227dac28a56d9d (patch)
tree7555e65a14ef028addbbd65ab0b57061203e0838 /run.ps1
parent379d36b5954e13c51af7c096ebfc1b6163cbea41 (diff)
parent89e2508acf89dff14190aa8e2338a9b60c1d397e (diff)
Merge branch release/2.2
Diffstat (limited to 'run.ps1')
-rw-r--r--run.ps115
1 files changed, 9 insertions, 6 deletions
diff --git a/run.ps1 b/run.ps1
index 60e533097c..6b7e36c6cf 100644
--- a/run.ps1
+++ b/run.ps1
@@ -14,6 +14,9 @@ The KoreBuild command to run.
.PARAMETER Path
The folder to build. Defaults to the folder containing this script.
+.PARAMETER LockFile
+The path to the korebuild-lock.txt file. Defaults to $Path/korebuild-lock.txt
+
.PARAMETER Channel
The channel of KoreBuild to download. Overrides the value from the config file.
@@ -75,6 +78,7 @@ param(
[Parameter(Mandatory=$true, Position = 0)]
[string]$Command,
[string]$Path = $PSScriptRoot,
+ [string]$LockFile,
[Alias('c')]
[string]$Channel,
[Alias('d')]
@@ -104,15 +108,13 @@ $ErrorActionPreference = 'Stop'
function Get-KoreBuild {
- $lockFile = Join-Path $Path 'korebuild-lock.txt'
-
- if (!(Test-Path $lockFile) -or $Update) {
- Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile
+ if (!(Test-Path $LockFile) -or $Update) {
+ Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $LockFile
}
- $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1
+ $version = Get-Content $LockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1
if (!$version) {
- Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'"
+ Write-Error "Failed to parse version from $LockFile. Expected a line that begins with 'version:'"
}
$version = $version.TrimStart('version:').Trim()
$korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version)
@@ -207,6 +209,7 @@ if (!$DotNetHome) {
else { Join-Path $PSScriptRoot '.dotnet'}
}
+if (!$LockFile) { $LockFile = Join-Path $Path 'korebuild-lock.txt' }
if (!$Channel) { $Channel = 'master' }
if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }