-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[main] Update dependencies from dotnet/arcade (#386)
* Update dependencies from https://github.com/dotnet/arcade build 20230728.2 Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.23371.1 -> To Version 8.0.0-beta.23378.2 * Update dependencies from https://github.com/dotnet/arcade build 20230804.2 Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.23371.1 -> To Version 8.0.0-beta.23404.2 * Update dependencies from https://github.com/dotnet/arcade build 20230811.1 Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.23371.1 -> To Version 8.0.0-beta.23411.1 * Update dependencies from https://github.com/dotnet/arcade build 20230819.1 Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.23371.1 -> To Version 8.0.0-beta.23419.1 * Update dependencies from https://github.com/dotnet/arcade build 20230825.2 Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.23371.1 -> To Version 8.0.0-beta.23425.2 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Taylor Southwick <[email protected]>
- Loading branch information
1 parent
94a53db
commit 7678dee
Showing
17 changed files
with
409 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# | ||
# This file must be used by invoking ". .\activate.ps1" from the command line. | ||
# You cannot run it directly. See https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scripts#script-scope-and-dot-sourcing | ||
# | ||
# To exit from the environment this creates, execute the 'deactivate' function. | ||
# | ||
|
||
if ($MyInvocation.CommandOrigin -eq 'runspace') { | ||
Write-Host -f Red "This script cannot be invoked directly." | ||
Write-Host -f Red "To function correctly, this script file must be 'dot sourced' by calling `". $PSCommandPath`" (notice the dot at the beginning)." | ||
exit 1 | ||
} | ||
|
||
function deactivate ([switch]$init) { | ||
|
||
# reset old environment variables | ||
if (Test-Path variable:_OLD_PATH) { | ||
$env:PATH = $_OLD_PATH | ||
Remove-Item variable:_OLD_PATH | ||
} | ||
|
||
if (test-path function:_old_prompt) { | ||
Set-Item Function:prompt -Value $function:_old_prompt -ea ignore | ||
remove-item function:_old_prompt | ||
} | ||
|
||
Remove-Item env:DOTNET_ROOT -ea ignore | ||
Remove-Item 'env:DOTNET_ROOT(x86)' -ea Ignore | ||
Remove-Item env:DOTNET_MULTILEVEL_LOOKUP -ea ignore | ||
if (-not $init) { | ||
# Remove the deactivate function | ||
Remove-Item function:deactivate | ||
} | ||
} | ||
|
||
# Cleanup the environment | ||
deactivate -init | ||
|
||
$_OLD_PATH = $env:PATH | ||
# Tell dotnet where to find itself | ||
$env:DOTNET_ROOT = "$PSScriptRoot\.dotnet" | ||
${env:DOTNET_ROOT(x86)} = "$PSScriptRoot\.dotnet\x86" | ||
# Tell dotnet not to look beyond the DOTNET_ROOT folder for more dotnet things | ||
$env:DOTNET_MULTILEVEL_LOOKUP = 0 | ||
# Put dotnet first on PATH | ||
$env:PATH = "${env:DOTNET_ROOT};${env:PATH}" | ||
|
||
# Set the shell prompt | ||
if (-not $env:DISABLE_CUSTOM_PROMPT) { | ||
$function:_old_prompt = $function:prompt | ||
function dotnet_prompt { | ||
# Add a prefix to the current prompt, but don't discard it. | ||
write-host "($( split-path $PSScriptRoot -leaf )) " -nonewline | ||
& $function:_old_prompt | ||
} | ||
|
||
Set-Item Function:prompt -Value $function:dotnet_prompt -ea ignore | ||
} | ||
|
||
Write-Host -f Magenta "Enabled the .NET Core environment. Execute 'deactivate' to exit." | ||
if (-not (Test-Path "${env:DOTNET_ROOT}\dotnet.exe")) { | ||
Write-Host -f Yellow ".NET Core has not been installed yet. Run $PSScriptRoot\restore.cmd to install it." | ||
} | ||
else { | ||
Write-Host "dotnet = ${env:DOTNET_ROOT}\dotnet.exe" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
#!/usr/bin/env bash | ||
|
||
# getNonPortableDistroRid | ||
# | ||
# Input: | ||
# targetOs: (str) | ||
# targetArch: (str) | ||
# rootfsDir: (str) | ||
# | ||
# Return: | ||
# non-portable rid | ||
getNonPortableDistroRid() | ||
{ | ||
local targetOs="$1" | ||
local targetArch="$2" | ||
local rootfsDir="$3" | ||
local nonPortableRid="" | ||
|
||
if [ "$targetOs" = "linux" ]; then | ||
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%.*}" | ||
fi | ||
|
||
if [[ "${VERSION_ID:-}" =~ ^([[: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 | ||
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%%.*}"; }) | ||
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}" | ||
elif command -v getprop && getprop ro.product.system.model 2>&1 | 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" | ||
;; | ||
joyent_*) | ||
__smartos_major_version=$(echo "${__uname_version:7:4}") | ||
nonPortableRid=smartos."$__smartos_major_version"-"$targetArch" | ||
;; | ||
illumos_*) | ||
nonPortableRid=openindiana-"$targetArch" | ||
;; | ||
esac | ||
elif [ "$targetOs" = "solaris" ]; then | ||
__uname_version=$(uname -v) | ||
__solaris_major_version=$(echo "${__uname_version%.*}") | ||
nonPortableRid=solaris."$__solaris_major_version"-"$targetArch" | ||
elif [ "$targetOs" = "haiku" ]; then | ||
__uname_release=$(uname -r) | ||
nonPortableRid=haiku.r"$__uname_release"-"$targetArch" | ||
fi | ||
|
||
echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')" | ||
} | ||
|
||
# initDistroRidGlobal | ||
# | ||
# Input: | ||
# os: (str) | ||
# arch: (str) | ||
# rootfsDir?: (nullable:string) | ||
# | ||
# Return: | ||
# 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. | ||
# | ||
initDistroRidGlobal() | ||
{ | ||
local targetOs="$1" | ||
local targetArch="$2" | ||
local 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." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
__DistroRid=$(getNonPortableDistroRid "${targetOs}" "${targetArch}" "${rootfsDir}") | ||
|
||
if [ -z "${__PortableTargetOS:-}" ]; then | ||
__PortableTargetOS="$targetOs" | ||
|
||
STRINGS="$(command -v strings || true)" | ||
if [ -z "$STRINGS" ]; then | ||
STRINGS="$(command -v llvm-strings || true)" | ||
fi | ||
|
||
# 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" | ||
fi | ||
fi | ||
|
||
export __DistroRid __PortableTargetOS | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Use uname to determine what the OS is. | ||
OSName=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
|
||
if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then | ||
OSName="android" | ||
fi | ||
|
||
case "$OSName" in | ||
freebsd|linux|netbsd|openbsd|sunos|android|haiku) | ||
os="$OSName" ;; | ||
darwin) | ||
os=osx ;; | ||
*) | ||
echo "Unsupported OS $OSName detected!" | ||
exit 1 ;; | ||
esac | ||
|
||
# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html | ||
# and `uname -p` returns processor type (e.g. i386 on amd64). | ||
# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html. | ||
if [ "$os" = "sunos" ]; then | ||
if uname -o 2>&1 | grep -q illumos; then | ||
os="illumos" | ||
else | ||
os="solaris" | ||
fi | ||
CPUName=$(isainfo -n) | ||
else | ||
# For the rest of the operating systems, use uname(1) to determine what the CPU is. | ||
CPUName=$(uname -m) | ||
fi | ||
|
||
case "$CPUName" in | ||
arm64|aarch64) | ||
arch=arm64 | ||
;; | ||
|
||
loongarch64) | ||
arch=loongarch64 | ||
;; | ||
|
||
riscv64) | ||
arch=riscv64 | ||
;; | ||
|
||
amd64|x86_64) | ||
arch=x64 | ||
;; | ||
|
||
armv7l|armv8l) | ||
if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then | ||
arch=armel | ||
else | ||
arch=arm | ||
fi | ||
;; | ||
|
||
armv6l) | ||
arch=armv6 | ||
;; | ||
|
||
i[3-6]86) | ||
echo "Unsupported CPU $CPUName detected, build might not succeed!" | ||
arch=x86 | ||
;; | ||
|
||
s390x) | ||
arch=s390x | ||
;; | ||
|
||
ppc64le) | ||
arch=ppc64le | ||
;; | ||
*) | ||
echo "Unknown CPU $CPUName detected!" | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.