Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,65 +34,65 @@
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>bd278630dd08914ef521e62658afb69845c5b93a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19229.8">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a7a250e9c13147134543c35fef2fb81f19592edf</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="NETStandard.Library" Version="2.1.0-prerelease.19230.1">
<Uri>https://github.com/dotnet/standard</Uri>
<Sha>e94d4263f03ced7269275c10a59d1dddb0c76b7c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19229.8">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a7a250e9c13147134543c35fef2fb81f19592edf</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.19229.8">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="2.4.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="2.4.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.19254.1">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CoreFxTesting" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.CoreFxTesting" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Configuration" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Configuration" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="1.0.0-beta.19254.1">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="1.0.0-beta.19257.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>b1d8ba9936d10e8d287474e28278477d2126742a</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190506.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
24 changes: 12 additions & 12 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
</PropertyGroup>
<PropertyGroup>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19229.8</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetGenAPIPackageVersion>
<MicrosoftDotNetGenFacadesPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>2.4.0-beta.19254.1</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetXUnitConsoleRunnerPackageVersion>2.5.1-beta.19254.1</MicrosoftDotNetXUnitConsoleRunnerPackageVersion>
<MicrosoftDotNetBuildTasksPackagingPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetBuildTasksPackagingPackageVersion>
<MicrosoftDotNetCoreFxTestingPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetCoreFxTestingPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetBuildTasksConfigurationPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetBuildTasksConfigurationPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>2.2.0-beta.19254.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftDotNetVersionToolsTasksPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetVersionToolsTasksPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetGenAPIPackageVersion>
<MicrosoftDotNetGenFacadesPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>2.4.0-beta.19257.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetXUnitConsoleRunnerPackageVersion>2.5.1-beta.19257.3</MicrosoftDotNetXUnitConsoleRunnerPackageVersion>
<MicrosoftDotNetBuildTasksPackagingPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetBuildTasksPackagingPackageVersion>
<MicrosoftDotNetCoreFxTestingPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetCoreFxTestingPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetBuildTasksConfigurationPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetBuildTasksConfigurationPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>2.2.0-beta.19257.3</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftDotNetVersionToolsTasksPackageVersion>1.0.0-beta.19257.3</MicrosoftDotNetVersionToolsTasksPackageVersion>
<!-- Core-setup dependencies -->
<MicrosoftNETCoreAppPackageVersion>3.0.0-preview6-27705-02</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostPackageVersion>3.0.0-preview6-27705-02</MicrosoftNETCoreDotNetHostPackageVersion>
Expand Down
18 changes: 2 additions & 16 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ usage()
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
}

Expand Down Expand Up @@ -137,22 +137,8 @@ while [[ $# > 0 ]]; do
node_reuse=$2
shift
;;
-p:*|/p:*)
properties="$properties $1"
;;
-m:*|/m:*)
properties="$properties $1"
;;
-bl:*|/bl:*)
properties="$properties $1"
;;
-dl:*|/dl:*)
properties="$properties $1"
;;
*)
echo "Invalid argument: $1"
usage
exit 1
properties="$properties $1"
;;
esac

Expand Down
2 changes: 2 additions & 0 deletions eng/common/dotnet-install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
22 changes: 22 additions & 0 deletions eng/common/dotnet-install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $verbosity = "minimal",
[string] $architecture = "",
[string] $version = "Latest",
[string] $runtime = "dotnet"
)

. $PSScriptRoot\tools.ps1

try {
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
InstallDotNet $dotnetRoot $version $architecture $runtime $true
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}

ExitWithExitCode 0
49 changes: 49 additions & 0 deletions eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash

source="${BASH_SOURCE[0]}"
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

version='Latest'
architecture=''
runtime='dotnet'
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
-version|-v)
shift
version="$1"
;;
-architecture|-a)
shift
architecture="$1"
;;
-runtime|-r)
shift
runtime="$1"
;;
*)
echo "Invalid argument: $1"
usage
exit 1
;;
esac
shift
done

. "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet"
InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
local exit_code=$?
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}

ExitWithExitCode 0
3 changes: 3 additions & 0 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ jobs:
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

variables:
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- name: DOTNET_CLI_TELEMETRY_PROFILE
value: '$(Build.Repository.Uri)'
- ${{ each variable in parameters.variables }}:
# handle name-value variable syntax
# example:
Expand Down
27 changes: 21 additions & 6 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function InitializeDotNetCli([bool]$install) {
}

# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
$dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
if ($dotnetCmd -ne $null) {
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
Expand All @@ -119,7 +119,7 @@ function InitializeDotNetCli([bool]$install) {

# Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,
# otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.
if (($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
Expand Down Expand Up @@ -152,7 +152,7 @@ function InitializeDotNetCli([bool]$install) {
}

function GetDotNetInstallScript([string] $dotnetRoot) {
$installScript = "$dotnetRoot\dotnet-install.ps1"
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile $installScript
Expand All @@ -162,9 +162,21 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
}

function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
InstallDotNet $dotnetRoot $version $architecture
}

function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { $installScript = GetDotNetInstallScript $dotnetRoot
$installScript = GetDotNetInstallScript $dotnetRoot
$archArg = if ($architecture) { $architecture } else { "<auto>" }
& $installScript -Version $version -InstallDir $dotnetRoot -Architecture $archArg
$installParameters = @{
Version = $version
InstallDir = $dotnetRoot
}

if ($architecture) { $installParameters.Architecture = $architecture }
if ($runtime) { $installParameters.Runtime = $runtime }
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }

& $installScript @installParameters
if ($lastExitCode -ne 0) {
Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
ExitWithExitCode $lastExitCode
Expand Down Expand Up @@ -429,6 +441,7 @@ function InitializeToolset() {
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }

'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Set-Content $proj

MSBuild $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile

$path = Get-Content $toolsetLocationFile -TotalCount 1
Expand Down Expand Up @@ -522,6 +535,8 @@ $ToolsDir = Join-Path $RepoRoot ".tools"
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
# true if global.json contains a "runtimes" section
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }

Create-Directory $ToolsetDir
Create-Directory $TempDir
Expand All @@ -534,4 +549,4 @@ if ($ci) {

$env:TEMP = $TempDir
$env:TMP = $TempDir
}
}
Loading