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:
authorPranav K <prkrishn@hotmail.com>2017-11-28 21:55:08 +0300
committerPranav K <prkrishn@hotmail.com>2017-11-28 22:54:09 +0300
commit12e6e99d923815dc8897054a67733367e7674519 (patch)
treece4435ec0b50d96d9ce4b780987a4518957a0f13 /run.ps1
parent5274867cb7eaff89988010fee3a13d154c82578d (diff)
Add support for restore sources and package version props url
Fixes #654 Fixes #656
Diffstat (limited to 'run.ps1')
-rw-r--r--run.ps132
1 files changed, 28 insertions, 4 deletions
diff --git a/run.ps1 b/run.ps1
index 49c2899856..e46d790b60 100644
--- a/run.ps1
+++ b/run.ps1
@@ -29,8 +29,17 @@ Updates KoreBuild to the latest version even if a lock file is present.
.PARAMETER ConfigFile
The path to the configuration file that stores values. Defaults to korebuild.json.
-.PARAMETER Arguments
-Arguments to be passed to the command
+.PARAMETER PackageVersionPropsUrl
+(optional) the url of the package versions props path containing dependency versions.
+
+.PARAMETER AccessTokenSuffix
+(optional) the query string to append to any blob store access for PackageVersionPropsUrl, if any.
+
+.PARAMETER RestoreSources
+(optional) Semi-colon delimited list of additional NuGet feeds to use as part of restore.
+
+.PARAMETER MSBuildArguments
+Additional MSBuild arguments to be passed through.
.NOTES
This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.
@@ -63,8 +72,11 @@ param(
[Alias('u')]
[switch]$Update,
[string]$ConfigFile,
+ [string]$PackageVersionPropsUrl = $null,
+ [string]$AccessTokenSuffix = $null,
+ [string]$RestoreSources = $null,
[Parameter(ValueFromRemainingArguments = $true)]
- [string[]]$Arguments
+ [string[]]$MSBuildArguments
)
Set-StrictMode -Version 2
@@ -177,6 +189,18 @@ if (!$DotNetHome) {
if (!$Channel) { $Channel = 'dev' }
if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }
+if ($PackageVersionPropsUrl) {
+ $IntermediateDir = Join-Path $PSScriptRoot 'obj'
+ $PropsFilePath = Join-Path $IntermediateDir 'external-dependencies.props'
+ New-Item -ItemType Directory $IntermediateDir -ErrorAction Ignore | Out-Null
+ Get-RemoteFile "${PackageVersionPropsUrl}${AccessTokenSuffix}" $PropsFilePath
+ $MSBuildArguments += "-p:DotNetPackageVersionPropsPath=$PropsFilePath"
+}
+
+if ($RestoreSources) {
+ $MSBuildArguments = "-p:DotNetRestoreSources=$RestoreSources"
+}
+
# Execute
$korebuildPath = Get-KoreBuild
@@ -184,7 +208,7 @@ Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
try {
Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile
- Invoke-KoreBuildCommand $Command @Arguments
+ Invoke-KoreBuildCommand $Command @MSBuildArguments
}
finally {
Remove-Module 'KoreBuild' -ErrorAction Ignore