You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-07-12 18:10:31 +07:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
5689bbdcd0 | |||
39bfcfef74 | |||
893aeb5420 | |||
b90f08a647 |
7
.github/csc.json
vendored
7
.github/csc.json
vendored
@ -4,14 +4,15 @@
|
|||||||
"owner": "csc",
|
"owner": "csc",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(CS\\d+)\\s*:\\s*(.*)$",
|
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)(\\[(.+)\\/([^\\/]+)\\])$",
|
||||||
"file": 1,
|
"file": 1,
|
||||||
"location": 2,
|
"location": 2,
|
||||||
"severity": 3,
|
"severity": 3,
|
||||||
"code": 4,
|
"code": 4,
|
||||||
"message": 5
|
"message": 5,
|
||||||
|
"fromPath": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: Main workflow
|
name: Main workflow
|
||||||
on: [push, pull_request]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Run
|
name: Run
|
||||||
|
14
externals/install-dotnet.ps1
vendored
14
externals/install-dotnet.ps1
vendored
@ -46,7 +46,6 @@
|
|||||||
Possible values:
|
Possible values:
|
||||||
- dotnet - the Microsoft.NETCore.App shared runtime
|
- dotnet - the Microsoft.NETCore.App shared runtime
|
||||||
- aspnetcore - the Microsoft.AspNetCore.App shared runtime
|
- aspnetcore - the Microsoft.AspNetCore.App shared runtime
|
||||||
- windowsdesktop - the Microsoft.WindowsDesktop.App shared runtime
|
|
||||||
.PARAMETER DryRun
|
.PARAMETER DryRun
|
||||||
If set it will not perform installation but instead display what command line to use to consistently install
|
If set it will not perform installation but instead display what command line to use to consistently install
|
||||||
currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
|
currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
|
||||||
@ -84,7 +83,7 @@ param(
|
|||||||
[string]$Version="Latest",
|
[string]$Version="Latest",
|
||||||
[string]$InstallDir="<auto>",
|
[string]$InstallDir="<auto>",
|
||||||
[string]$Architecture="<auto>",
|
[string]$Architecture="<auto>",
|
||||||
[ValidateSet("dotnet", "aspnetcore", "windowsdesktop", IgnoreCase = $false)]
|
[ValidateSet("dotnet", "aspnetcore", IgnoreCase = $false)]
|
||||||
[string]$Runtime,
|
[string]$Runtime,
|
||||||
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
|
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
|
||||||
[switch]$SharedRuntime,
|
[switch]$SharedRuntime,
|
||||||
@ -269,10 +268,6 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
|
|||||||
elseif ($Runtime -eq "aspnetcore") {
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
# Currently, the WindowsDesktop runtime is manufactured with the .Net core runtime
|
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
|
||||||
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
|
|
||||||
}
|
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
if ($Coherent) {
|
if ($Coherent) {
|
||||||
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
|
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
|
||||||
@ -330,9 +325,6 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string
|
|||||||
elseif ($Runtime -eq "aspnetcore") {
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
|
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
|
||||||
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
|
|
||||||
}
|
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
|
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
|
||||||
}
|
}
|
||||||
@ -572,10 +564,6 @@ elseif ($Runtime -eq "aspnetcore") {
|
|||||||
$assetName = "ASP.NET Core Runtime"
|
$assetName = "ASP.NET Core Runtime"
|
||||||
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
|
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
|
||||||
$assetName = ".NET Core Windows Desktop Runtime"
|
|
||||||
$dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App"
|
|
||||||
}
|
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$assetName = ".NET Core SDK"
|
$assetName = ".NET Core SDK"
|
||||||
$dotnetPackageRelativePath = "sdk"
|
$dotnetPackageRelativePath = "sdk"
|
||||||
|
8
externals/install-dotnet.sh
vendored
8
externals/install-dotnet.sh
vendored
@ -148,7 +148,7 @@ get_linux_platform_name() {
|
|||||||
return 0
|
return 0
|
||||||
elif [ -e /etc/redhat-release ]; then
|
elif [ -e /etc/redhat-release ]; then
|
||||||
local redhatRelease=$(</etc/redhat-release)
|
local redhatRelease=$(</etc/redhat-release)
|
||||||
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux "*" release 6."* ]]; then
|
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
|
||||||
echo "rhel.6"
|
echo "rhel.6"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -612,9 +612,6 @@ copy_files_or_dirs_from_list() {
|
|||||||
local target="$out_path/$path"
|
local target="$out_path/$path"
|
||||||
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
|
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
|
||||||
mkdir -p "$out_path/$(dirname "$path")"
|
mkdir -p "$out_path/$(dirname "$path")"
|
||||||
if [ -d "$target" ]; then
|
|
||||||
rm -rf "$target"
|
|
||||||
fi
|
|
||||||
cp -R $override_switch "$root_path/$path" "$target"
|
cp -R $override_switch "$root_path/$path" "$target"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -871,9 +868,6 @@ do
|
|||||||
runtime="$1"
|
runtime="$1"
|
||||||
if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then
|
if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then
|
||||||
say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'."
|
say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'."
|
||||||
if [[ "$runtime" == "windowsdesktop" ]]; then
|
|
||||||
say_err "WindowsDesktop archives are manufactured for Windows platforms only."
|
|
||||||
fi
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -73,7 +73,7 @@ class DotnetCoreInstaller {
|
|||||||
console.log('Using cached tool');
|
console.log('Using cached tool');
|
||||||
}
|
}
|
||||||
// Need to set this so that .NET Core global tools find the right locations.
|
// Need to set this so that .NET Core global tools find the right locations.
|
||||||
core.exportVariable('DOTNET_ROOT', toolPath);
|
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));
|
||||||
// Prepend the tools path. instructs the agent to prepend for future tasks
|
// Prepend the tools path. instructs the agent to prepend for future tasks
|
||||||
core.addPath(toolPath);
|
core.addPath(toolPath);
|
||||||
});
|
});
|
||||||
|
@ -59,7 +59,7 @@ export class DotnetCoreInstaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Need to set this so that .NET Core global tools find the right locations.
|
// Need to set this so that .NET Core global tools find the right locations.
|
||||||
core.exportVariable('DOTNET_ROOT', toolPath);
|
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));
|
||||||
|
|
||||||
// Prepend the tools path. instructs the agent to prepend for future tasks
|
// Prepend the tools path. instructs the agent to prepend for future tasks
|
||||||
core.addPath(toolPath);
|
core.addPath(toolPath);
|
||||||
|
Reference in New Issue
Block a user