Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro <@dotnet-maestro>2019-05-01 23:27:36 +0300
committerMarek Safar <marek.safar@gmail.com>2019-05-02 11:20:31 +0300
commit10b39a309b77a1c3aab983f51dd6b030bc1e5dfe (patch)
treed1ed92079942ea686602a05fe6ddf49ba8f7f6fe /eng/common
parent77ac60e951a2db91a61bd4af5fa644edeae43075 (diff)
Update dependencies from https://github.com/dotnet/arcade build 20190501.4
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19251.4
Diffstat (limited to 'eng/common')
-rw-r--r--eng/common/build.ps14
-rwxr-xr-xeng/common/build.sh4
-rw-r--r--eng/common/init-tools-native.ps16
-rw-r--r--eng/common/init-tools-native.sh12
-rw-r--r--eng/common/tools.ps110
-rw-r--r--eng/common/tools.sh12
6 files changed, 39 insertions, 9 deletions
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index d0147db4b..ed9f754ea 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -122,6 +122,10 @@ try {
. $configureToolsetScript
}
+ if ($restore) {
+ InitializeNativeTools
+ }
+
Build
}
catch {
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 40b1e8ec7..e14210632 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -218,4 +218,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
use_installed_dotnet_cli="$useInstalledDotNetCli"
fi
+if [[ "$restore" == true ]]; then
+ InitializeNativeTools
+fi
+
Build
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index 495a563a7..a4306bd37 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -41,9 +41,13 @@ Param (
[switch] $Force = $False,
[int] $DownloadRetries = 5,
[int] $RetryWaitTimeInSeconds = 30,
- [string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json"
+ [string] $GlobalJsonFile
)
+if (!$GlobalJsonFile) {
+ $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
+}
+
Set-StrictMode -version 2.0
$ErrorActionPreference="Stop"
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 54b70f678..fc72d1394 100644
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -9,7 +9,7 @@ clean=false
force=false
download_retries=5
retry_wait_time_seconds=30
-global_json_file="${scriptroot}/../../global.json"
+global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets
. $scriptroot/native/common-library.sh
@@ -71,6 +71,7 @@ function ReadGlobalJsonNativeTools {
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
native_tools_list=${native_tools_list//[\" ]/}
native_tools_list=${native_tools_list//,/$'\n'}
+ native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[:space:]')"
local old_IFS=$IFS
while read -r line; do
@@ -116,8 +117,6 @@ else
installer_command+=" --clean"
fi
- echo "Installing $tool version $tool_version"
- echo "Executing '$installer_command'"
$installer_command
if [[ $? != 0 ]]; then
@@ -127,19 +126,16 @@ else
done
fi
-if [[ ! -z $clean ]]; then
+if [[ $clean = true ]]; then
exit 0
fi
if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
- if [[ !-z BUILD_BUILDNUMBER ]]; then
- echo "##vso[task.prependpath]$install_bin"
- fi
+ echo "##vso[task.prependpath]$install_bin"
else
echo "Native tools install directory does not exist, installation failed" >&2
exit 1
fi
exit 0
-
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 5c4a129c8..09794dff8 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -391,6 +391,16 @@ function GetSdkTaskProject([string]$taskName) {
return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj"
}
+function InitializeNativeTools() {
+ if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
+ $nativeArgs=""
+ if ($ci) {
+ $nativeArgs = "-InstallDirectory $ToolsDir"
+ }
+ Invoke-Expression "& `"$PSScriptRoot/init-tools-native.ps1`" $nativeArgs"
+ }
+}
+
function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index ecdece1f8..59f47c5fa 100644
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -212,6 +212,17 @@ function GetNuGetPackageCachePath {
_GetNuGetPackageCachePath=$NUGET_PACKAGES
}
+function InitializeNativeTools() {
+ if grep -Fq "native-tools" $global_json_file
+ then
+ local nativeArgs=""
+ if [[ "$ci" == true ]]; then
+ nativeArgs="-InstallDirectory $tools_dir"
+ fi
+ "$_script_dir/init-tools-native.sh" $nativeArgs
+ fi
+}
+
function InitializeToolset {
if [[ -n "${_InitializeToolset:-}" ]]; then
return
@@ -307,6 +318,7 @@ eng_root=`cd -P "$_script_dir/.." && pwd`
repo_root=`cd -P "$_script_dir/../.." && pwd`
artifacts_dir="$repo_root/artifacts"
toolset_dir="$artifacts_dir/toolset"
+tools_dir="$repo_root/.tools"
log_dir="$artifacts_dir/log/$configuration"
temp_dir="$artifacts_dir/tmp/$configuration"