Revert "Update dependencies from https://github.com/dotnet/arcade build 20190530...
authorWilliam Godbe <wigodbe@microsoft.com>
Fri, 31 May 2019 21:02:43 +0000 (14:02 -0700)
committerwtgodbe <wigodbe@microsoft.com>
Fri, 31 May 2019 21:03:49 +0000 (14:03 -0700)
This reverts commit aa26688ee5e2b03945a22cda324887341e10595f.

eng/Version.Details.xml
eng/Versions.props
eng/common/LoggingCommandFunctions.ps1 [deleted file]
eng/common/build.ps1
eng/common/build.sh
eng/common/tools.ps1
global.json

index 9c4e978..f6d4a65 100644 (file)
@@ -3,21 +3,21 @@
   <ProductDependencies>
   </ProductDependencies>
   <ToolsetDependencies>
-    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19280.2">
+    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19279.5">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>7c50d548001a83a18449ad4dda370122ede5fbf6</Sha>
+      <Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19280.2">
+    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19279.5">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>7c50d548001a83a18449ad4dda370122ede5fbf6</Sha>
+      <Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19280.2">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19279.5">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>7c50d548001a83a18449ad4dda370122ede5fbf6</Sha>
+      <Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19280.2">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19279.5">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>7c50d548001a83a18449ad4dda370122ede5fbf6</Sha>
+      <Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
     </Dependency>
     <Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-preview6.19279.8">
       <Uri>https://github.com/dotnet/corefx</Uri>
index 1bfe625..0668788 100644 (file)
@@ -14,8 +14,8 @@
     <UsingToolXliff>false</UsingToolXliff>
     <!-- Package versions -->
     <!-- arcade -->
-    <MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19280.2</MicrosoftDotNetBuildTasksFeedVersion>
-    <MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19280.2</MicrosoftDotNetBuildTasksPackagingVersion>
+    <MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19279.5</MicrosoftDotNetBuildTasksFeedVersion>
+    <MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19279.5</MicrosoftDotNetBuildTasksPackagingVersion>
     <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.19278.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
     <!-- corefx -->
     <MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview6.19279.8</MicrosoftPrivateCoreFxNETCoreAppVersion>
diff --git a/eng/common/LoggingCommandFunctions.ps1 b/eng/common/LoggingCommandFunctions.ps1
deleted file mode 100644 (file)
index c225eae..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1
-
-# NOTE: You should not be calling these method directly as they are likely to change.  Instead you should be calling the Write-Pipeline* functions defined in tools.ps1
-
-$script:loggingCommandPrefix = '##vso['
-$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
-    New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
-    New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
-    New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' }
-    New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' }
-)
-# TODO: BUG: Escape % ???
-# TODO: Add test to verify don't need to escape "=".
-
-<########################################
-# Private functions.
-########################################>
-function Format-LoggingCommandData {
-    [CmdletBinding()]
-    param([string]$Value, [switch]$Reverse)
-
-    if (!$Value) {
-        return ''
-    }
-
-    if (!$Reverse) {
-        foreach ($mapping in $script:loggingCommandEscapeMappings) {
-            $Value = $Value.Replace($mapping.Token, $mapping.Replacement)
-        }
-    } else {
-        for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) {
-            $mapping = $script:loggingCommandEscapeMappings[$i]
-            $Value = $Value.Replace($mapping.Replacement, $mapping.Token)
-        }
-    }
-
-    return $Value
-}
-
-function Format-LoggingCommand {
-    [CmdletBinding()]
-    param(
-        [Parameter(Mandatory = $true)]
-        [string]$Area,
-        [Parameter(Mandatory = $true)]
-        [string]$Event,
-        [string]$Data,
-        [hashtable]$Properties)
-
-    # Append the preamble.
-    [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder
-    $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event)
-
-    # Append the properties.
-    if ($Properties) {
-        $first = $true
-        foreach ($key in $Properties.Keys) {
-            [string]$value = Format-LoggingCommandData $Properties[$key]
-            if ($value) {
-                if ($first) {
-                    $null = $sb.Append(' ')
-                    $first = $false
-                } else {
-                    $null = $sb.Append(';')
-                }
-
-                $null = $sb.Append("$key=$value")
-            }
-        }
-    }
-
-    # Append the tail and output the value.
-    $Data = Format-LoggingCommandData $Data
-    $sb.Append(']').Append($Data).ToString()
-}
-
-function Write-LoggingCommand {
-    [CmdletBinding(DefaultParameterSetName = 'Parameters')]
-    param(
-        [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
-        [string]$Area,
-        [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
-        [string]$Event,
-        [Parameter(ParameterSetName = 'Parameters')]
-        [string]$Data,
-        [Parameter(ParameterSetName = 'Parameters')]
-        [hashtable]$Properties,
-        [Parameter(Mandatory = $true, ParameterSetName = 'Object')]
-        $Command,
-        [switch]$AsOutput)
-
-    if ($PSCmdlet.ParameterSetName -eq 'Object') {
-        Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput
-        return
-    }
-
-    $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
-    if ($AsOutput) {
-        $command
-    } else {
-        Write-Host $command
-    }
-}
-
-function Write-LogIssue {
-    [CmdletBinding()]
-    param(
-        [ValidateSet('warning', 'error')]
-        [Parameter(Mandatory = $true)]
-        [string]$Type,
-        [string]$Message,
-        [string]$ErrCode,
-        [string]$SourcePath,
-        [string]$LineNumber,
-        [string]$ColumnNumber,
-        [switch]$AsOutput)
-
-    $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{
-            'type' = $Type
-            'code' = $ErrCode
-            'sourcepath' = $SourcePath
-            'linenumber' = $LineNumber
-            'columnnumber' = $ColumnNumber
-        }
-    if ($AsOutput) {
-        return $command
-    }
-
-    if ($Type -eq 'error') {
-        $foregroundColor = $host.PrivateData.ErrorForegroundColor
-        $backgroundColor = $host.PrivateData.ErrorBackgroundColor
-        if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
-            $foregroundColor = [System.ConsoleColor]::Red
-            $backgroundColor = [System.ConsoleColor]::Black
-        }
-    } else {
-        $foregroundColor = $host.PrivateData.WarningForegroundColor
-        $backgroundColor = $host.PrivateData.WarningBackgroundColor
-        if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
-            $foregroundColor = [System.ConsoleColor]::Yellow
-            $backgroundColor = [System.ConsoleColor]::Black
-        }
-    }
-
-    Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
-}
\ No newline at end of file
index 4cb2ce4..67046a4 100644 (file)
@@ -133,8 +133,9 @@ try {
   Build
 }
 catch {
+  Write-Host $_
+  Write-Host $_.Exception
   Write-Host $_.ScriptStackTrace
-  Write-PipelineTaskError -Message $_
   ExitWithExitCode 1
 }
 
index 6236fc4..9729655 100755 (executable)
@@ -209,8 +209,9 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
   use_installed_dotnet_cli="$useInstalledDotNetCli"
 fi
 
-if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
-  InitializeNativeTools
-fi
+# Workaround for https://github.com/dotnet/arcade/issues/2673
+# if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
+#  InitializeNativeTools
+# fi
 
 Build
index 3983d71..9cea610 100644 (file)
@@ -92,68 +92,6 @@ function Exec-Process([string]$command, [string]$commandArgs) {
   }
 }
 
-function Write-PipelineTaskError {
-  [CmdletBinding()]
-  param(
-    [Parameter(Mandatory = $true)]
-    [string]$Message,
-    [Parameter(Mandatory = $false)]
-    [string]$Type = 'error',
-    [string]$ErrCode,
-    [string]$SourcePath,
-    [string]$LineNumber,
-    [string]$ColumnNumber,
-    [switch]$AsOutput)
-
-    if(!$ci) {
-      if($Type -eq 'error') {
-        Write-Error $Message
-        return
-      }
-      elseif ($Type -eq 'warning') {
-        Write-Warning $Message
-        return
-      }
-    }
-
-    if(($Type -ne 'error') -and ($Type -ne 'warning')) {
-      Write-Host $Message
-      return
-    }
-    if(-not $PSBoundParameters.ContainsKey('Type')) {
-      $PSBoundParameters.Add('Type', 'error')
-    }
-    Write-LogIssue @PSBoundParameters
-}
-
-function Write-PipelineSetVariable {
-  [CmdletBinding()]
-  param(
-    [Parameter(Mandatory = $true)]
-    [string]$Name,
-    [string]$Value,
-    [switch]$Secret,
-    [switch]$AsOutput)
-
-    if($ci) {
-      Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
-        'variable' = $Name
-        'issecret' = $Secret
-      } -AsOutput:$AsOutput
-    }
-}
-
-function Write-PipelinePrependPath {
-  [CmdletBinding()]
-  param(
-    [Parameter(Mandatory=$true)]
-    [string]$Path,
-    [switch]$AsOutput)
-    if($ci) {
-      Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
-    }
-}
-
 function InitializeDotNetCli([bool]$install) {
   if (Test-Path variable:global:_DotNetInstallDir) {
     return $global:_DotNetInstallDir
@@ -196,7 +134,7 @@ function InitializeDotNetCli([bool]$install) {
       if ($install) {
         InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
       } else {
-        Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
+        Write-Host "Unable to find dotnet with SDK version '$dotnetSdkVersion'" -ForegroundColor Red
         ExitWithExitCode 1
       }
     }
@@ -209,10 +147,12 @@ function InitializeDotNetCli([bool]$install) {
   # It also ensures that VS msbuild will use the downloaded sdk targets.
   $env:PATH = "$dotnetRoot;$env:PATH"
 
-  # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
-  Write-PipelinePrependPath -Path $dotnetRoot
-  Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
-  Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
+  if ($ci) {
+    # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
+    Write-Host "##vso[task.prependpath]$dotnetRoot"
+    Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0"
+    Write-Host "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1"
+  }
 
   return $global:_DotNetInstallDir = $dotnetRoot
 }
@@ -244,7 +184,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
 
   & $installScript @installParameters
   if ($lastExitCode -ne 0) {
-    Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
+    Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
     ExitWithExitCode $lastExitCode
   }
 }
@@ -418,7 +358,7 @@ function InitializeBuildTool() {
 
   if ($msbuildEngine -eq "dotnet") {
     if (!$dotnetRoot) {
-      Write-PipelineTaskError "/global.json must specify 'tools.dotnet'."
+      Write-Host "/global.json must specify 'tools.dotnet'." -ForegroundColor Red
       ExitWithExitCode 1
     }
 
@@ -427,13 +367,13 @@ function InitializeBuildTool() {
     try {
       $msbuildPath = InitializeVisualStudioMSBuild -install:$restore
     } catch {
-      Write-PipelineTaskError $_
+      Write-Host $_ -ForegroundColor Red
       ExitWithExitCode 1
     }
 
     $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
   } else {
-    Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'."
+    Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red
     ExitWithExitCode 1
   }
 
@@ -450,7 +390,7 @@ function GetDefaultMSBuildEngine() {
     return "dotnet"
   }
 
-  Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
+  Write-Host "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." -ForegroundColor Red
   ExitWithExitCode 1
 }
 
@@ -501,7 +441,7 @@ function InitializeToolset() {
   }
 
   if (-not $restore) {
-    Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored."
+    Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
     ExitWithExitCode 1
   }
 
@@ -586,7 +526,7 @@ function MSBuild-Core() {
   $exitCode = Exec-Process $buildTool.Path $cmdArgs
 
   if ($exitCode -ne 0) {
-    Write-PipelineTaskError "Build failed."
+    Write-Host "Build failed." -ForegroundColor Red
 
     $buildLog = GetMSBuildBinaryLogCommandLineArgument $args
     if ($buildLog -ne $null) {      
@@ -614,8 +554,6 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
   return $null
 }
 
-. $PSScriptRoot\LoggingCommandFunctions.ps1
-
 $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
 $EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
 $ArtifactsDir = Join-Path $RepoRoot "artifacts"
@@ -631,8 +569,11 @@ Create-Directory $ToolsetDir
 Create-Directory $TempDir
 Create-Directory $LogDir
 
-Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir
-Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
-Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
-Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
-Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
+if ($ci) {
+  Write-Host "##vso[task.setvariable variable=Artifacts]$ArtifactsDir"
+  Write-Host "##vso[task.setvariable variable=Artifacts.Toolset]$ToolsetDir"
+  Write-Host "##vso[task.setvariable variable=Artifacts.Log]$LogDir"
+
+  $env:TEMP = $TempDir
+  $env:TMP = $TempDir
+}
index bef75d5..7437a67 100644 (file)
@@ -7,8 +7,8 @@
     "python": "2.7.15"
   },
   "msbuild-sdks": {
-    "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19280.2",
-    "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19280.2",
+    "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5",
+    "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5",
     "Microsoft.Build.NoTargets": "1.0.53",
     "Microsoft.Build.Traversal": "2.0.2"
   }