maui/eng/common/dotnet-install.sh

95 строки
2.2 KiB
Bash
Исходник Постоянная ссылка Обычный вид История

[ci] Move to arcade , remove GitInfo and Mono dependencies (#21487) * try add internal * needs missing paths * [arcade] Add arcade files * Try build with arcade * Update internal * try other pool * Update default image for sdl * try same pool for pack * Update arcade release * Remove gitinfo and update global.jso * update nuget * try again * More updates * Dont sign * Fix package icon * Update Controls.Build.Tasks.csproj * Update Controls.Build.Tasks.csproj * need set versions * tre * Use ArtifactsBinDir * new binaries folder * isShiping true * more cleanup * add post build * fix * try official * try again * DebugType to portable ? * use one versions * Add publish_build_assets * again * again * Wrap on arcade job * again * use self * again * try again * dupe * remove dupes * add Build Config * More variables * push * Fix merge * update to find the path * Update scripts * Add build config * Update android scripts * Remove more xunit versions * Update xunit * Update versions * update more * try this * Fix versions * Remove the test sdk by default * Can this be false? * No need to reference xunit.runner.visualstudio * IsTestProject to false * Fix more device tests paths * Assembly should be 1.0 * Try fix msbuild tests * Fix file version test * Fix some culture tests * try fix restore for next step * Disable fileversion test * Fix androidtests * Fix android app finding * Fix * maybe this way it lauches * Try compat * Fix versions * Fix image tests * Try without this * Fix build * Update windows.cake * Update windows.cake * Update windows.cake * Update provisioning.csx * remove reference test sdk * remove extra * try fix compat uitests * Fix build * build control gallery uitest with dotnet test * Remove nunit console * Fix pushing test results for compat tests * Set correct property msbuild props * Update arcade * Update Directory.Build.props * Update Version.Details.xml * Fix logs artifacts * update source gen tests * Use PackageIconFullPath so Arcade adds our file * Remove file not used * [ci] Push rollback for branch name * Add Compatibility.UnitTests to sln * Update dotnet.cake * Update AssemblyInfoTests.cs * Update pack.yml * Remove extra files * Update Microsoft.Maui.sln * Update Microsoft.Maui-dev.sln * Update pipeline * Fix internal * Try new catalyst cleanup * Update catalyst * Update iOS cake * Fix Cg-gallery on iOS * try again * Refactor android cake * Fix catalyst not finding the app * Make sure to handle results all platforms * Fix naming and test results --------- Co-authored-by: Rui Marinho <ruimarinho@MSFT-M3-PRO.ihome> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2024-05-07 15:49:39 +03:00
#!/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 )"
. "$scriptroot/tools.sh"
version='Latest'
architecture=''
runtime='dotnet'
runtimeSourceFeed=''
runtimeSourceFeedKey=''
while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-version|-v)
shift
version="$1"
;;
-architecture|-a)
shift
architecture="$1"
;;
-runtime|-r)
shift
runtime="$1"
;;
-runtimesourcefeed)
shift
runtimeSourceFeed="$1"
;;
-runtimesourcefeedkey)
shift
runtimeSourceFeedKey="$1"
;;
*)
Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
exit 1
;;
esac
shift
done
# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples
cpuname=$(uname -m)
case $cpuname in
arm64|aarch64)
buildarch=arm64
if [ "$(getconf LONG_BIT)" -lt 64 ]; then
# This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS)
buildarch=arm
fi
;;
loongarch64)
buildarch=loongarch64
;;
amd64|x86_64)
buildarch=x64
;;
armv*l)
buildarch=arm
;;
i[3-6]86)
buildarch=x86
;;
2024-07-30 17:26:12 +03:00
riscv64)
buildarch=riscv64
;;
[ci] Move to arcade , remove GitInfo and Mono dependencies (#21487) * try add internal * needs missing paths * [arcade] Add arcade files * Try build with arcade * Update internal * try other pool * Update default image for sdl * try same pool for pack * Update arcade release * Remove gitinfo and update global.jso * update nuget * try again * More updates * Dont sign * Fix package icon * Update Controls.Build.Tasks.csproj * Update Controls.Build.Tasks.csproj * need set versions * tre * Use ArtifactsBinDir * new binaries folder * isShiping true * more cleanup * add post build * fix * try official * try again * DebugType to portable ? * use one versions * Add publish_build_assets * again * again * Wrap on arcade job * again * use self * again * try again * dupe * remove dupes * add Build Config * More variables * push * Fix merge * update to find the path * Update scripts * Add build config * Update android scripts * Remove more xunit versions * Update xunit * Update versions * update more * try this * Fix versions * Remove the test sdk by default * Can this be false? * No need to reference xunit.runner.visualstudio * IsTestProject to false * Fix more device tests paths * Assembly should be 1.0 * Try fix msbuild tests * Fix file version test * Fix some culture tests * try fix restore for next step * Disable fileversion test * Fix androidtests * Fix android app finding * Fix * maybe this way it lauches * Try compat * Fix versions * Fix image tests * Try without this * Fix build * Update windows.cake * Update windows.cake * Update windows.cake * Update provisioning.csx * remove reference test sdk * remove extra * try fix compat uitests * Fix build * build control gallery uitest with dotnet test * Remove nunit console * Fix pushing test results for compat tests * Set correct property msbuild props * Update arcade * Update Directory.Build.props * Update Version.Details.xml * Fix logs artifacts * update source gen tests * Use PackageIconFullPath so Arcade adds our file * Remove file not used * [ci] Push rollback for branch name * Add Compatibility.UnitTests to sln * Update dotnet.cake * Update AssemblyInfoTests.cs * Update pack.yml * Remove extra files * Update Microsoft.Maui.sln * Update Microsoft.Maui-dev.sln * Update pipeline * Fix internal * Try new catalyst cleanup * Update catalyst * Update iOS cake * Fix Cg-gallery on iOS * try again * Refactor android cake * Fix catalyst not finding the app * Make sure to handle results all platforms * Fix naming and test results --------- Co-authored-by: Rui Marinho <ruimarinho@MSFT-M3-PRO.ihome> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2024-05-07 15:49:39 +03:00
*)
echo "Unknown CPU $cpuname detected, treating it as x64"
buildarch=x64
;;
esac
dotnetRoot="${repo_root}.dotnet"
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
dotnetRoot="$dotnetRoot/$architecture"
fi
InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
[ci] Move to arcade , remove GitInfo and Mono dependencies (#21487) * try add internal * needs missing paths * [arcade] Add arcade files * Try build with arcade * Update internal * try other pool * Update default image for sdl * try same pool for pack * Update arcade release * Remove gitinfo and update global.jso * update nuget * try again * More updates * Dont sign * Fix package icon * Update Controls.Build.Tasks.csproj * Update Controls.Build.Tasks.csproj * need set versions * tre * Use ArtifactsBinDir * new binaries folder * isShiping true * more cleanup * add post build * fix * try official * try again * DebugType to portable ? * use one versions * Add publish_build_assets * again * again * Wrap on arcade job * again * use self * again * try again * dupe * remove dupes * add Build Config * More variables * push * Fix merge * update to find the path * Update scripts * Add build config * Update android scripts * Remove more xunit versions * Update xunit * Update versions * update more * try this * Fix versions * Remove the test sdk by default * Can this be false? * No need to reference xunit.runner.visualstudio * IsTestProject to false * Fix more device tests paths * Assembly should be 1.0 * Try fix msbuild tests * Fix file version test * Fix some culture tests * try fix restore for next step * Disable fileversion test * Fix androidtests * Fix android app finding * Fix * maybe this way it lauches * Try compat * Fix versions * Fix image tests * Try without this * Fix build * Update windows.cake * Update windows.cake * Update windows.cake * Update provisioning.csx * remove reference test sdk * remove extra * try fix compat uitests * Fix build * build control gallery uitest with dotnet test * Remove nunit console * Fix pushing test results for compat tests * Set correct property msbuild props * Update arcade * Update Directory.Build.props * Update Version.Details.xml * Fix logs artifacts * update source gen tests * Use PackageIconFullPath so Arcade adds our file * Remove file not used * [ci] Push rollback for branch name * Add Compatibility.UnitTests to sln * Update dotnet.cake * Update AssemblyInfoTests.cs * Update pack.yml * Remove extra files * Update Microsoft.Maui.sln * Update Microsoft.Maui-dev.sln * Update pipeline * Fix internal * Try new catalyst cleanup * Update catalyst * Update iOS cake * Fix Cg-gallery on iOS * try again * Refactor android cake * Fix catalyst not finding the app * Make sure to handle results all platforms * Fix naming and test results --------- Co-authored-by: Rui Marinho <ruimarinho@MSFT-M3-PRO.ihome> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2024-05-07 15:49:39 +03:00
local exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
ExitWithExitCode 0