Skip to content

Commit

Permalink
Update dependencies from https://github.com/dotnet/arcade build 20240…
Browse files Browse the repository at this point in the history
…227.2 (#275)

[main] Update dependencies from dotnet/arcade
  • Loading branch information
dotnet-maestro[bot] authored Feb 27, 2024
1 parent 4de63f3 commit abd1bd0
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 49 deletions.
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24114.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24127.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>d5b02a4900c4d521cb48b8f0d7e3f28175268f7c</Sha>
<Sha>d9930e5e9a0069e5b7726c119f614486b8ef438f</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Wpf.Sdk" Version="6.0.0-preview.5.21220.1">
<Uri>https://github.com/dotnet/wpf</Uri>
Expand Down
80 changes: 38 additions & 42 deletions eng/common/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

# getNonPortableDistroRid
#
Expand All @@ -11,67 +11,66 @@
# non-portable rid
getNonPortableDistroRid()
{
local targetOs="$1"
local targetArch="$2"
local rootfsDir="$3"
local nonPortableRid=""
targetOs="$1"
targetArch="$2"
rootfsDir="$3"
nonPortableRid=""

if [ "$targetOs" = "linux" ]; then
# shellcheck disable=SC1091
if [ -e "${rootfsDir}/etc/os-release" ]; then
source "${rootfsDir}/etc/os-release"

if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then
# remove the last version digit
VERSION_ID="${VERSION_ID%.*}"
. "${rootfsDir}/etc/os-release"
if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ] || [ "${ID}" = "alpine" ]; then
VERSION_ID="${VERSION_ID%.*}" # Remove the last version digit for these distros
fi

if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then
if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then
nonPortableRid="${ID}.${VERSION_ID}-${targetArch}"
else
# Rolling release distros either do not set VERSION_ID, set it as blank or
# set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux);
# so omit it here to be consistent with everything else.
nonPortableRid="${ID}-${targetArch}"
fi

elif [ -e "${rootfsDir}/android_platform" ]; then
source "$rootfsDir"/android_platform
# shellcheck disable=SC1091
. "${rootfsDir}/android_platform"
nonPortableRid="$RID"
fi
fi

if [ "$targetOs" = "freebsd" ]; then
# $rootfsDir can be empty. freebsd-version is shell script and it should always work.
__freebsd_major_version=$($rootfsDir/bin/freebsd-version | { read v; echo "${v%%.*}"; })
# $rootfsDir can be empty. freebsd-version is a shell script and should always work.
__freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1)
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}"
elif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then
elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then
__android_sdk_version=$(getprop ro.build.version.sdk)
nonPortableRid="android.$__android_sdk_version-${targetArch}"
elif [ "$targetOs" = "illumos" ]; then
__uname_version=$(uname -v)
case "$__uname_version" in
omnios-*)
__omnios_major_version=$(echo "${__uname_version:8:2}")
nonPortableRid=omnios."$__omnios_major_version"-"$targetArch"
;;
__omnios_major_version=$(echo "$__uname_version" | cut -c9-10)
nonPortableRid="omnios.$__omnios_major_version-${targetArch}"
;;
joyent_*)
__smartos_major_version=$(echo "${__uname_version:7:4}")
nonPortableRid=smartos."$__smartos_major_version"-"$targetArch"
;;
illumos_*)
nonPortableRid=openindiana-"$targetArch"
;;
__smartos_major_version=$(echo "$__uname_version" | cut -c9-10)
nonPortableRid="smartos.$__smartos_major_version-${targetArch}"
;;
*)
nonPortableRid="illumos-${targetArch}"
;;
esac
elif [ "$targetOs" = "solaris" ]; then
__uname_version=$(uname -v)
__solaris_major_version=$(echo "${__uname_version%.*}")
nonPortableRid=solaris."$__solaris_major_version"-"$targetArch"
__solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1)
nonPortableRid="solaris.$__solaris_major_version-${targetArch}"
elif [ "$targetOs" = "haiku" ]; then
__uname_release=$(uname -r)
__uname_release="$(uname -r)"
nonPortableRid=haiku.r"$__uname_release"-"$targetArch"
fi

echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')"
echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]'
}

# initDistroRidGlobal
Expand All @@ -85,26 +84,23 @@ getNonPortableDistroRid()
# None
#
# Notes:
#
# It is important to note that the function does not return anything, but it
# exports the following variables on success:
#
# __DistroRid : Non-portable rid of the target platform.
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
#
# It is important to note that the function does not return anything, but it
# exports the following variables on success:
# __DistroRid : Non-portable rid of the target platform.
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
initDistroRidGlobal()
{
local targetOs="$1"
local targetArch="$2"
local rootfsDir=""
if [ "$#" -ge 3 ]; then
targetOs="$1"
targetArch="$2"
rootfsDir=""
if [ $# -ge 3 ]; then
rootfsDir="$3"
fi

if [ -n "${rootfsDir}" ]; then
# We may have a cross build. Check for the existence of the rootfsDir
if [ ! -e "${rootfsDir}" ]; then
echo "Error rootfsDir has been passed, but the location is not valid."
echo "Error: rootfsDir has been passed, but the location is not valid."
exit 1
fi
fi
Expand All @@ -119,7 +115,7 @@ initDistroRidGlobal()
STRINGS="$(command -v llvm-strings || true)"
fi

# Check for musl-based distros (e.g Alpine Linux, Void Linux).
# Check for musl-based distros (e.g. Alpine Linux, Void Linux).
if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl ||
( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then
__PortableTargetOS="linux-musl"
Expand Down
3 changes: 2 additions & 1 deletion eng/common/native/init-os-and-arch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

# Use uname to determine what the OS is.
OSName=$(uname -s | tr '[:upper:]' '[:lower:]')
Expand Down Expand Up @@ -54,6 +54,7 @@ case "$CPUName" in
;;

armv7l|armv8l)
# shellcheck disable=SC1091
if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then
arch=armel
else
Expand Down
6 changes: 5 additions & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ $ErrorActionPreference = 'Stop'
# Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed
[string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null }

# True if the build is a product build
[bool]$productBuild = if (Test-Path variable:productBuild) { $productBuild } else { $false }

function Create-Directory ([string[]] $path) {
New-Item -Path $path -Force -ItemType 'Directory' | Out-Null
}
Expand Down Expand Up @@ -850,7 +853,8 @@ function MSBuild-Core() {
}

# When running on Azure Pipelines, override the returned exit code to avoid double logging.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null) {
# Skip this when the build is a child of the VMR orchestrator build.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$productBuild -and $properties -notlike "*DotNetBuildRepo=true*") {
Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
Expand Down
6 changes: 5 additions & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ fi
runtime_source_feed=${runtime_source_feed:-''}
runtime_source_feed_key=${runtime_source_feed_key:-''}

# True if the build is a product build
product_build=${product_build:-false}

# Resolve any symlinks in the given path.
function ResolvePath {
local path=$1
Expand Down Expand Up @@ -503,7 +506,8 @@ function MSBuild-Core {
echo "Build failed with exit code $exit_code. Check errors above."

# When running on Azure Pipelines, override the returned exit code to avoid double logging.
if [[ "$ci" == "true" && -n ${SYSTEM_TEAMPROJECT:-} ]]; then
# Skip this when the build is a child of the VMR orchestrator build.
if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$product_build" != true && $properties != *"DotNetBuildRepo=true"* ]]; then
Write-PipelineSetResult -result "Failed" -message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-alpha.1.23615.4",
"dotnet": "9.0.100-preview.1.24101.2",
"runtimes": {
"dotnet": [
"2.1.7",
Expand All @@ -12,7 +12,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24114.1",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24127.2",
"Microsoft.DotNet.Arcade.Wpf.Sdk": "6.0.0-alpha.1.21071.6",
"Microsoft.NET.Sdk.WindowsDesktop": "6.0.0-preview.6.21276.7"
},
Expand Down

0 comments on commit abd1bd0

Please sign in to comment.