Skip to content

Commit acf689b

Browse files
[master] Update dependencies from dotnet/arcade (#6666)
* Update dependencies from https://github.com/dotnet/arcade build 20190501.6 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19251.6 * Update dependencies from https://github.com/dotnet/arcade build 20190502.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19252.2
1 parent 6ec8c21 commit acf689b

File tree

8 files changed

+43
-13
lines changed

8 files changed

+43
-13
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19230.6">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19252.2">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>ac8d88df02d246d3147338fcfb03b1b93dc84b53</Sha>
8+
<Sha>ed63a7faf2d119829dd971be91bb46b6ebaa1dd2</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/build.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ try {
122122
. $configureToolsetScript
123123
}
124124

125+
if ($restore) {
126+
InitializeNativeTools
127+
}
128+
125129
Build
126130
}
127131
catch {

eng/common/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
218218
use_installed_dotnet_cli="$useInstalledDotNetCli"
219219
fi
220220

221+
if [[ "$restore" == true ]]; then
222+
InitializeNativeTools
223+
fi
224+
221225
Build

eng/common/init-tools-native.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ Param (
4141
[switch] $Force = $False,
4242
[int] $DownloadRetries = 5,
4343
[int] $RetryWaitTimeInSeconds = 30,
44-
[string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json"
44+
[string] $GlobalJsonFile
4545
)
4646

47+
if (!$GlobalJsonFile) {
48+
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
49+
}
50+
4751
Set-StrictMode -version 2.0
4852
$ErrorActionPreference="Stop"
4953

eng/common/init-tools-native.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ clean=false
99
force=false
1010
download_retries=5
1111
retry_wait_time_seconds=30
12-
global_json_file="${scriptroot}/../../global.json"
12+
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
1313
declare -A native_assets
1414

1515
. $scriptroot/native/common-library.sh
@@ -71,6 +71,7 @@ function ReadGlobalJsonNativeTools {
7171
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
7272
native_tools_list=${native_tools_list//[\" ]/}
7373
native_tools_list=${native_tools_list//,/$'\n'}
74+
native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[:space:]')"
7475

7576
local old_IFS=$IFS
7677
while read -r line; do
@@ -116,8 +117,6 @@ else
116117
installer_command+=" --clean"
117118
fi
118119

119-
echo "Installing $tool version $tool_version"
120-
echo "Executing '$installer_command'"
121120
$installer_command
122121

123122
if [[ $? != 0 ]]; then
@@ -127,19 +126,16 @@ else
127126
done
128127
fi
129128

130-
if [[ ! -z $clean ]]; then
129+
if [[ $clean = true ]]; then
131130
exit 0
132131
fi
133132

134133
if [[ -d $install_bin ]]; then
135134
echo "Native tools are available from $install_bin"
136-
if [[ !-z BUILD_BUILDNUMBER ]]; then
137-
echo "##vso[task.prependpath]$install_bin"
138-
fi
135+
echo "##vso[task.prependpath]$install_bin"
139136
else
140137
echo "Native tools install directory does not exist, installation failed" >&2
141138
exit 1
142139
fi
143140

144141
exit 0
145-

eng/common/tools.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,16 @@ function GetSdkTaskProject([string]$taskName) {
391391
return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj"
392392
}
393393

394+
function InitializeNativeTools() {
395+
if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
396+
$nativeArgs=""
397+
if ($ci) {
398+
$nativeArgs = "-InstallDirectory $ToolsDir"
399+
}
400+
Invoke-Expression "& `"$PSScriptRoot/init-tools-native.ps1`" $nativeArgs"
401+
}
402+
}
403+
394404
function InitializeToolset() {
395405
if (Test-Path variable:global:_ToolsetBuildProj) {
396406
return $global:_ToolsetBuildProj

eng/common/tools.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,17 @@ function GetNuGetPackageCachePath {
212212
_GetNuGetPackageCachePath=$NUGET_PACKAGES
213213
}
214214

215+
function InitializeNativeTools() {
216+
if grep -Fq "native-tools" $global_json_file
217+
then
218+
local nativeArgs=""
219+
if [[ "$ci" == true ]]; then
220+
nativeArgs="-InstallDirectory $tools_dir"
221+
fi
222+
"$_script_dir/init-tools-native.sh" $nativeArgs
223+
fi
224+
}
225+
215226
function InitializeToolset {
216227
if [[ -n "${_InitializeToolset:-}" ]]; then
217228
return
@@ -307,6 +318,7 @@ eng_root=`cd -P "$_script_dir/.." && pwd`
307318
repo_root=`cd -P "$_script_dir/../.." && pwd`
308319
artifacts_dir="$repo_root/artifacts"
309320
toolset_dir="$artifacts_dir/toolset"
321+
tools_dir="$repo_root/.tools"
310322
log_dir="$artifacts_dir/log/$configuration"
311323
temp_dir="$artifacts_dir/tmp/$configuration"
312324

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "2.1.504",
3+
"dotnet": "2.2.203",
44
"vs": {
55
"version": "16.0",
66
"components": [
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19230.6",
13+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19252.2",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

0 commit comments

Comments
 (0)