diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99d1e889f4f4dee352ecaad82cdc3156a8cae562..43569f47d660b8cf518159b3c33d17dcf5909133 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -47,9 +47,9 @@ - + https://github.com/dotnet/arcade - 0fb5fc58347f42121ddc9c0b361e84b8acbffb12 + bed438c56afcd799b4de747291cf68815ae2f53b diff --git a/eng/common/PublishBuildAssets.cmd b/eng/common/PublishBuildAssets.cmd index ac629f00e12a5f8cee2ff91fbf09b8c57e7709e8..3c6e4ff829d57b395b706e75b381d7dc68255bd9 100644 --- a/eng/common/PublishBuildAssets.cmd +++ b/eng/common/PublishBuildAssets.cmd @@ -1,3 +1,3 @@ @echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -msbuildEngine dotnet -restore -execute -binaryLog /p:PublishBuildAssets=true /p:SdkTaskProjects=PublishBuildAssets.proj %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0sdk-task.ps1""" -msbuildEngine dotnet -restore -projects PublishBuildAssets.proj -ci %*" exit /b %ErrorLevel% diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 2f5e6052a85fcf08cddc4a225e73dfe0a8d5b55b..8279dc713391bedb20b6ec8e68d071aa4bca6649 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -6,7 +6,6 @@ Param( [string] $msbuildEngine = $null, [bool] $warnAsError = $true, [bool] $nodeReuse = $true, - [switch] $execute, [switch][Alias('r')]$restore, [switch] $deployDeps, [switch][Alias('b')]$build, @@ -18,7 +17,6 @@ Param( [switch] $sign, [switch] $pack, [switch] $publish, - [switch] $publishBuildAssets, [switch][Alias('bl')]$binaryLog, [switch] $ci, [switch] $prepareMachine, @@ -48,7 +46,6 @@ function Print-Usage() { Write-Host " -performanceTest Run all performance tests in the solution" Write-Host " -sign Sign build outputs" Write-Host " -publish Publish artifacts (e.g. symbols)" - Write-Host " -publishBuildAssets Push assets to BAR" Write-Host "" Write-Host "Advanced settings:" @@ -61,7 +58,6 @@ function Print-Usage() { Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." } - function InitializeCustomToolset { if (-not $restore) { return @@ -77,6 +73,7 @@ function InitializeCustomToolset { function Build { $toolsetBuildProj = InitializeToolset InitializeCustomToolset + $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } if ($projects) { @@ -102,7 +99,6 @@ function Build { /p:PerformanceTest=$performanceTest ` /p:Sign=$sign ` /p:Publish=$publish ` - /p:Execute=$execute ` /p:ContinuousIntegrationBuild=$ci ` @properties } diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..9ba7530122f6961d38a6f2adb02c14eef94214af --- /dev/null +++ b/eng/common/sdk-task.ps1 @@ -0,0 +1,74 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $projects = "", + [string][Alias('v')]$verbosity = "minimal", + [string] $msbuildEngine = $null, + [bool] $warnAsError = $true, + [switch][Alias('bl')]$binaryLog, + [switch][Alias('r')]$restore, + [switch] $ci, + [switch] $prepareMachine, + [switch] $help, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties +) + +. $PSScriptRoot\tools.ps1 + +function Print-Usage() { + Write-Host "Common settings:" + Write-Host " -v[erbosity] Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" + Write-Host " -[bl|binaryLog] Output binary log (short: -bl)" + Write-Host " -help Print help and exit" + Write-Host "" + + Write-Host "Advanced settings:" + Write-Host " -restore Restore dependencies (short: -r)" + Write-Host " -projects Semi-colon delimited list of sln/proj's from the Arcade sdk to build. Globbing is supported (*.sln)" + Write-Host " -ci Set when running on CI server" + Write-Host " -prepareMachine Prepare machine for CI run" + Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host "" + Write-Host "Command line arguments not listed above are passed thru to msbuild." + Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." +} + +function Build { + $toolsetBuildProj = InitializeToolset + + $toolsetBuildProj = Join-Path (Split-Path $toolsetBuildProj -Parent) "SdkTasks\SdkTask.proj" + $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "SdkTask.binlog") } else { "" } + MSBuild $toolsetBuildProj ` + $bl ` + /p:Projects=$projects ` + /p:Restore=$restore ` + /p:RepoRoot=$RepoRoot ` + /p:ContinuousIntegrationBuild=$ci ` + @properties +} + +try { + if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) { + Print-Usage + exit 0 + } + + if ($projects -eq "") { + Write-Error "Missing required parameter '-projects '" + Print-Usage + ExitWithExitCode 1 + } + + if ($ci) { + $binaryLog = $true + } + + Build +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + ExitWithExitCode 1 +} + +ExitWithExitCode 0 diff --git a/global.json b/global.json index 61760a3f2411f5c3bcf9b7d86796e0a8f381d33b..eac09e1f24080590bc4fb0f7667cfb08f1f13651 100644 --- a/global.json +++ b/global.json @@ -9,6 +9,6 @@ "version": "3.0.100-preview-010024" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19066.1" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19067.6" } }