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>2017-12-20 20:34:09 +0300
committerNate McMaster <nate.mcmaster@microsoft.com>2017-12-20 21:04:45 +0300
commitd66405bef15cefd065c4faa943452aeb1f4026d3 (patch)
treef08bb5e54f230ce06a392c0de373c6938e129a8c /run.ps1
parentee8d0f30ebfd0d97d5eb889e7dd90aaf388571a5 (diff)
Fixup the run.sh build script
- add the --reinstall flag - add error messages when parameters are missing values - use arrays to property concatenate pass-thru args
Diffstat (limited to 'run.ps1')
-rw-r--r--run.ps18
1 files changed, 8 insertions, 0 deletions
diff --git a/run.ps1 b/run.ps1
index 588b0dde31..cab9fbe6e7 100644
--- a/run.ps1
+++ b/run.ps1
@@ -26,6 +26,9 @@ The base url where build tools can be downloaded. Overrides the value from the c
.PARAMETER Update
Updates KoreBuild to the latest version even if a lock file is present.
+.PARAMETER Reinstall
+Re-installs KoreBuild
+
.PARAMETER ConfigFile
The path to the configuration file that stores values. Defaults to korebuild.json.
@@ -74,6 +77,7 @@ param(
[string]$ToolsSource,
[Alias('u')]
[switch]$Update,
+ [switch]$Reinstall,
[string]$ConfigFile,
[string]$PackageVersionPropsUrl = $null,
[string]$AccessTokenSuffix = $null,
@@ -105,6 +109,10 @@ function Get-KoreBuild {
$version = $version.TrimStart('version:').Trim()
$korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version)
+ if ($Reinstall -and (Test-Path $korebuildPath)) {
+ Remove-Item -Force -Recurse $korebuildPath
+ }
+
if (!(Test-Path $korebuildPath)) {
Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version"
New-Item -ItemType Directory -Path $korebuildPath | Out-Null