From 8aad93f856d6f4f499e9ea72e7451171ce671b3f Mon Sep 17 00:00:00 2001 From: Zachary Eisinger Date: Mon, 21 Sep 2020 14:11:39 -0700 Subject: [PATCH 001/108] Action input text update --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f62d018..df5b215 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ branding: color: green inputs: dotnet-version: - description: 'SDK version to use. Examples: 2.2.104, 3.1, 3.1.x' + description: 'Optional SDK version to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x' source-url: description: 'Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword' owner: From 9a46dbb681f2f33659e477d77636445e311c3e4c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 2 Feb 2021 10:41:51 +0300 Subject: [PATCH 002/108] Add issue and pr templates --- .github/ISSUE_TEMPLATE/bug_report.md | 18 ++++++------------ .github/ISSUE_TEMPLATE/feature_request.md | 16 ++++++++++++++++ .github/pull_request_template.md | 7 +++++++ 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a6287b1..522eec5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,22 +2,16 @@ name: Bug report about: Create a bug report title: '' -labels: '' +labels: bug assignees: '' --- -### Description +**Description:** A clear and concise description of what the bug is. - +**Expected behavior:** A description of what you expected to happen. -### Details +**Actual behavior:** A description of what is actually happening. - +**Repro steps:** +A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..76000ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,16 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' +--- + +**Description:** +Describe your proposal. + +**Related issue:** +Add issue link. + +**Pull request:** +Add pull request link (if it exists). \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..17b416a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +**Description**: Describe your changes. + +**Related issue:** Add link to related issue. + +**Documentation changes required:** (Y/N) Mark if documentation changes are required. + +**Added tests:** (Y/N) Mark if tests were added or updated according changes. \ No newline at end of file From 5551aab1c356b664236bdd7d49c11c978b3a0c75 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 2 Feb 2021 11:40:17 +0300 Subject: [PATCH 003/108] Update installer scripts --- externals/install-dotnet.ps1 | 649 ++++++++++++++++++++++------------- externals/install-dotnet.sh | 316 +++++++++++------ 2 files changed, 621 insertions(+), 344 deletions(-) diff --git a/externals/install-dotnet.ps1 b/externals/install-dotnet.ps1 index ceca8ea..ff26a05 100644 --- a/externals/install-dotnet.ps1 +++ b/externals/install-dotnet.ps1 @@ -23,8 +23,6 @@ Default: latest Represents a build version on specific channel. Possible values: - latest - most latest build on specific channel - - coherent - most latest coherent build on specific channel - coherent applies only to SDK downloads - 3-part version in a format A.B.C - represents specific version of build examples: 2.0.0-preview2-006120, 1.1.0 .PARAMETER InstallDir @@ -122,24 +120,42 @@ $VersionRegEx="/\d+\.\d+[^/]+/" $OverrideNonVersionedFiles = !$SkipNonVersionedFiles function Say($str) { - try - { + try { Write-Host "dotnet-install: $str" } - catch - { + catch { # Some platforms cannot utilize Write-Host (Azure Functions, for instance). Fall back to Write-Output Write-Output "dotnet-install: $str" } } +function Say-Warning($str) { + try { + Write-Warning "dotnet-install: $str" + } + catch { + # Some platforms cannot utilize Write-Warning (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: Warning: $str" + } +} + +# Writes a line with error style settings. +# Use this function to show a human-readable comment along with an exception. +function Say-Error($str) { + try { + # Write-Error is quite oververbose for the purpose of the function, let's write one line with error style settings. + $Host.UI.WriteErrorLine("dotnet-install: $str") + } + catch { + Write-Output "dotnet-install: Error: $str" + } +} + function Say-Verbose($str) { - try - { + try { Write-Verbose "dotnet-install: $str" } - catch - { + catch { # Some platforms cannot utilize Write-Verbose (Azure Functions, for instance). Fall back to Write-Output Write-Output "dotnet-install: $str" } @@ -156,7 +172,7 @@ function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [int]$MaxAttempts = 3, [in while ($true) { try { - return $ScriptBlock.Invoke() + return & $ScriptBlock } catch { $Attempts++ @@ -195,7 +211,7 @@ function Get-CLIArchitecture-From-Architecture([string]$Architecture) { { $_ -eq "x86" } { return "x86" } { $_ -eq "arm" } { return "arm" } { $_ -eq "arm64" } { return "arm64" } - default { throw "Architecture not supported. If you think this is a bug, report it at https://github.com/dotnet/sdk/issues" } + default { throw "Architecture '$Architecture' not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues" } } } @@ -270,18 +286,41 @@ function GetHTTPResponse([Uri] $Uri) # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out # 20 minutes allows it to work over much slower connections. $HttpClient.Timeout = New-TimeSpan -Minutes 20 - $Response = $HttpClient.GetAsync("${Uri}${FeedCredential}").Result - if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode))) { - # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. - $ErrorMsg = "Failed to download $Uri." - if ($Response -ne $null) { - $ErrorMsg += " $Response" + $Task = $HttpClient.GetAsync("${Uri}${FeedCredential}").ConfigureAwait("false"); + $Response = $Task.GetAwaiter().GetResult(); + + if (($null -eq $Response) -or (-not ($Response.IsSuccessStatusCode))) { + # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. + $DownloadException = [System.Exception] "Unable to download $Uri." + + if ($null -ne $Response) { + $DownloadException.Data["StatusCode"] = [int] $Response.StatusCode + $DownloadException.Data["ErrorMessage"] = "Unable to download $Uri. Returned HTTP status code: " + $DownloadException.Data["StatusCode"] } - throw $ErrorMsg + throw $DownloadException } - return $Response + return $Response + } + catch [System.Net.Http.HttpRequestException] { + $DownloadException = [System.Exception] "Unable to download $Uri." + + # Pick up the exception message and inner exceptions' messages if they exist + $CurrentException = $PSItem.Exception + $ErrorMsg = $CurrentException.Message + "`r`n" + while ($CurrentException.InnerException) { + $CurrentException = $CurrentException.InnerException + $ErrorMsg += $CurrentException.Message + "`r`n" + } + + # Check if there is an issue concerning TLS. + if ($ErrorMsg -like "*SSL/TLS*") { + $ErrorMsg += "Ensure that TLS 1.2 or higher is enabled to use this script.`r`n" + } + + $DownloadException.Data["ErrorMessage"] = $ErrorMsg + throw $DownloadException } finally { if ($HttpClient -ne $null) { @@ -291,7 +330,7 @@ function GetHTTPResponse([Uri] $Uri) }) } -function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) { +function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) { Say-Invocation $MyInvocation $VersionFileUrl = $null @@ -306,12 +345,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version" } elseif (-not $Runtime) { - if ($Coherent) { - $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version" - } - else { - $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" - } + $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" } else { throw "Invalid value for `$Runtime" @@ -320,7 +354,8 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co $Response = GetHTTPResponse -Uri $VersionFileUrl } catch { - throw "Could not resolve version information." + Say-Error "Could not resolve version information." + throw } $StringContent = $Response.Content.ReadAsStringAsync().Result @@ -346,7 +381,8 @@ function Parse-Jsonfile-For-Version([string]$JSonFile) { $JSonContent = Get-Content($JSonFile) -Raw | ConvertFrom-Json | Select-Object -expand "sdk" -ErrorAction SilentlyContinue } catch { - throw "Json file unreadable: '$JSonFile'" + Say-Error "Json file unreadable: '$JSonFile'" + throw } if ($JSonContent) { try { @@ -359,7 +395,8 @@ function Parse-Jsonfile-For-Version([string]$JSonFile) { } } catch { - throw "Unable to parse the SDK node in '$JSonFile'" + Say-Error "Unable to parse the SDK node in '$JSonFile'" + throw } } else { @@ -375,16 +412,12 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, Say-Invocation $MyInvocation if (-not $JSonFile) { - switch ($Version.ToLower()) { - { $_ -eq "latest" } { - $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False - return $LatestVersionInfo.Version - } - { $_ -eq "coherent" } { - $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True - return $LatestVersionInfo.Version - } - default { return $Version } + if ($Version.ToLower() -eq "latest") { + $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel + return $LatestVersionInfo.Version + } + else { + return $Version } } else { @@ -395,17 +428,20 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation + # If anything fails in this lookup it will default to $SpecificVersion + $SpecificProductVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion + if ($Runtime -eq "dotnet") { - $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" } elseif ($Runtime -eq "aspnetcore") { - $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" } elseif ($Runtime -eq "windowsdesktop") { - $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" } elseif (-not $Runtime) { - $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip" + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip" } else { throw "Invalid value for `$Runtime" @@ -413,7 +449,7 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string Say-Verbose "Constructed primary named payload URL: $PayloadURL" - return $PayloadURL + return $PayloadURL, $SpecificProductVersion } function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { @@ -434,6 +470,51 @@ function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [ return $PayloadURL } +function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion) { + Say-Invocation $MyInvocation + + if ($Runtime -eq "dotnet") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" + } + elseif ($Runtime -eq "aspnetcore") { + $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt" + } + elseif ($Runtime -eq "windowsdesktop") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" + } + elseif (-not $Runtime) { + $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt" + } + else { + throw "Invalid value '$Runtime' specified for `$Runtime" + } + + Say-Verbose "Checking for existence of $ProductVersionTxtURL" + + try { + $productVersionResponse = GetHTTPResponse($productVersionTxtUrl) + + if ($productVersionResponse.StatusCode -eq 200) { + $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() + if ($productVersion -ne $SpecificVersion) + { + Say "Using alternate version $productVersion found in $ProductVersionTxtURL" + } + + return $productVersion + } + else { + Say-Verbose "Got StatusCode $($productVersionResponse.StatusCode) trying to get productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion" + $productVersion = $SpecificVersion + } + } catch { + Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion (Exception: '$($_.Exception.Message)' )" + $productVersion = $SpecificVersion + } + + return $productVersion +} + function Get-User-Share-Path() { Say-Invocation $MyInvocation @@ -571,6 +652,23 @@ function DownloadFile($Source, [string]$OutPath) { } } +function SafeRemoveFile($Path) { + try { + if (Test-Path $Path) { + Remove-Item $Path + Say-Verbose "The temporary file `"$Path`" was removed." + } + else + { + Say-Verbose "The temporary file `"$Path`" does not exist, therefore is not removed." + } + } + catch + { + Say-Warning "Failed to remove the temporary file: `"$Path`", remove it manually." + } +} + function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) { $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath) if (-Not $NoPath) { @@ -587,9 +685,14 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde } } +Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" +Say "- The SDK needs to be installed without user interaction and without admin rights." +Say "- The SDK installation doesn't need to persist across multiple CI runs." +Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n" + $CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile -$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture $LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture $InstallRoot = Resolve-Installation-Path $InstallDir @@ -615,7 +718,12 @@ if ($DryRun) { } } Say "Repeatable invocation: $RepeatableCommand" - exit 0 + if ($SpecificVersion -ne $EffectiveVersion) + { + Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'" + } + + return } if ($Runtime -eq "dotnet") { @@ -638,12 +746,18 @@ else { throw "Invalid value for `$Runtime" } +if ($SpecificVersion -ne $EffectiveVersion) +{ + Say "Performing installation checks for effective version: $EffectiveVersion" + $SpecificVersion = $EffectiveVersion +} + # Check if the SDK version is already installed. $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion if ($isAssetInstalled) { Say "$assetName version $SpecificVersion is already installed." Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath - exit 0 + return } New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null @@ -651,30 +765,69 @@ New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null $installDrive = $((Get-Item $InstallRoot).PSDrive.Name); $diskInfo = Get-PSDrive -Name $installDrive if ($diskInfo.Free / 1MB -le 100) { - Say "There is not enough disk space on drive ${installDrive}:" - exit 0 + throw "There is not enough disk space on drive ${installDrive}:" } $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Zip path: $ZipPath" $DownloadFailed = $false -Say "Downloading link: $DownloadLink" + +$PrimaryDownloadStatusCode = 0 +$LegacyDownloadStatusCode = 0 + +$PrimaryDownloadFailedMsg = "" +$LegacyDownloadFailedMsg = "" + +Say "Downloading primary link $DownloadLink" try { DownloadFile -Source $DownloadLink -OutPath $ZipPath } catch { - Say "Cannot download: $DownloadLink" + if ($PSItem.Exception.Data.Contains("StatusCode")) { + $PrimaryDownloadStatusCode = $PSItem.Exception.Data["StatusCode"] + } + + if ($PSItem.Exception.Data.Contains("ErrorMessage")) { + $PrimaryDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"] + } else { + $PrimaryDownloadFailedMsg = $PSItem.Exception.Message + } + + if ($PrimaryDownloadStatusCode -eq 404) { + Say "The resource at $DownloadLink is not available." + } else { + Say $PSItem.Exception.Message + } + + SafeRemoveFile -Path $ZipPath + if ($LegacyDownloadLink) { $DownloadLink = $LegacyDownloadLink $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) Say-Verbose "Legacy zip path: $ZipPath" - Say "Downloading legacy link: $DownloadLink" + Say "Downloading legacy link $DownloadLink" try { DownloadFile -Source $DownloadLink -OutPath $ZipPath } catch { - Say "Cannot download: $DownloadLink" + if ($PSItem.Exception.Data.Contains("StatusCode")) { + $LegacyDownloadStatusCode = $PSItem.Exception.Data["StatusCode"] + } + + if ($PSItem.Exception.Data.Contains("ErrorMessage")) { + $LegacyDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"] + } else { + $LegacyDownloadFailedMsg = $PSItem.Exception.Message + } + + if ($LegacyDownloadStatusCode -eq 404) { + Say "The resource at $DownloadLink is not available." + } else { + Say $PSItem.Exception.Message + } + + SafeRemoveFile -Path $ZipPath $DownloadFailed = $true } } @@ -684,7 +837,19 @@ catch { } if ($DownloadFailed) { - throw "Could not find/download: `"$assetName`" with version = $SpecificVersion`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + if (($PrimaryDownloadStatusCode -eq 404) -and ((-not $LegacyDownloadLink) -or ($LegacyDownloadStatusCode -eq 404))) { + throw "Could not find `"$assetName`" with version = $SpecificVersion`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + } else { + # 404-NotFound is an expected response if it goes from only one of the links, do not show that error. + # If primary path is available (not 404-NotFound) then show the primary error else show the legacy error. + if ($PrimaryDownloadStatusCode -ne 404) { + throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$PrimaryDownloadFailedMsg" + } + if (($LegacyDownloadLink) -and ($LegacyDownloadStatusCode -ne 404)) { + throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$LegacyDownloadFailedMsg" + } + throw "Could not download `"$assetName`" with version = $SpecificVersion" + } } Say "Extracting zip from $DownloadLink" @@ -706,206 +871,208 @@ if (!$isAssetInstalled) { $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion } +# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm. if (!$isAssetInstalled) { + Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $DownloadLink.`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues." throw "`"$assetName`" with version = $SpecificVersion failed to install with an unknown error." } -Remove-Item $ZipPath +SafeRemoveFile -Path $ZipPath Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath +Say "Note that the script does not resolve dependencies during installation." +Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies" Say "Installation finished" -exit 0 - # SIG # Begin signature block -# MIIjlgYJKoZIhvcNAQcCoIIjhzCCI4MCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIjkgYJKoZIhvcNAQcCoIIjgzCCI38CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCXdb9pJ+MI1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a/externals/install-dotnet.sh b/externals/install-dotnet.sh index 0c20299..753a45b 100755 --- a/externals/install-dotnet.sh +++ b/externals/install-dotnet.sh @@ -40,7 +40,7 @@ if [ -t 1 ] && command -v tput > /dev/null; then fi say_warning() { - printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" + printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" >&3 } say_err() { @@ -183,6 +183,9 @@ get_current_os_name() { elif is_musl_based_distro; then echo "linux-musl" return 0 + elif [ "$linux_platform_name" = "linux-musl" ]; then + echo "linux-musl" + return 0 else echo "linux" return 0 @@ -241,42 +244,6 @@ check_min_reqs() { return 0 } -check_pre_reqs() { - eval $invocation - - if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then - return 0 - fi - - if [ "$(uname)" = "Linux" ]; then - if is_musl_based_distro; then - if ! command -v scanelf > /dev/null; then - say_warning "scanelf not found, please install pax-utils package." - return 0 - fi - LDCONFIG_COMMAND="scanelf --ldpath -BF '%f'" - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libintl)" ] && say_warning "Unable to locate libintl. Probable prerequisite missing; install libintl (or gettext)." - else - if [ ! -x "$(command -v ldconfig)" ]; then - say_verbose "ldconfig is not in PATH, trying /sbin/ldconfig." - LDCONFIG_COMMAND="/sbin/ldconfig" - else - LDCONFIG_COMMAND="ldconfig" - fi - local librarypath=${LD_LIBRARY_PATH:-} - LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }" - fi - - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep zlib)" ] && say_warning "Unable to locate zlib. Probable prerequisite missing; install zlib." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep ssl)" ] && say_warning "Unable to locate libssl. Probable prerequisite missing; install libssl." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_warning "Unable to locate libicu. Probable prerequisite missing; install libicu." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep lttng)" ] && say_warning "Unable to locate liblttng. Probable prerequisite missing; install libcurl." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libcurl)" ] && say_warning "Unable to locate libcurl. Probable prerequisite missing; install libcurl." - fi - - return 0 -} - # args: # input - $1 to_lowercase() { @@ -332,7 +299,7 @@ get_machine_architecture() { if command -v uname > /dev/null; then CPUName=$(uname -m) case $CPUName in - armv7l) + armv*l) echo "arm" return 0 ;; @@ -373,10 +340,34 @@ get_normalized_architecture_from_architecture() { ;; esac - say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/sdk/issues" + say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues" return 1 } +# args: +# user_defined_os - $1 +get_normalized_os() { + eval $invocation + + local osname="$(to_lowercase "$1")" + if [ ! -z "$osname" ]; then + case "$osname" in + osx | freebsd | rhel.6 | linux-musl | linux) + echo "$osname" + return 0 + ;; + *) + say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." + return 1 + ;; + esac + else + osname="$(get_current_os_name)" || return 1 + fi + echo "$osname" + return 0 +} + # The version text returned from the feeds is a 1-line or 2-line string: # For the SDK and the dotnet runtime (2 lines): # Line 1: # commit_hash @@ -418,14 +409,12 @@ is_dotnet_package_installed() { # azure_feed - $1 # channel - $2 # normalized_architecture - $3 -# coherent - $4 get_latest_version_info() { eval $invocation local azure_feed="$1" local channel="$2" local normalized_architecture="$3" - local coherent="$4" local version_file_url=null if [[ "$runtime" == "dotnet" ]]; then @@ -433,11 +422,7 @@ get_latest_version_info() { elif [[ "$runtime" == "aspnetcore" ]]; then version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" elif [ -z "$runtime" ]; then - if [ "$coherent" = true ]; then - version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" - else - version_file_url="$uncached_feed/Sdk/$channel/latest.version" - fi + version_file_url="$uncached_feed/Sdk/$channel/latest.version" else say_err "Invalid value for \$runtime" return 1 @@ -468,7 +453,6 @@ parse_jsonfile_for_version() { sdk_list=$(echo $sdk_section | awk -F"[{}]" '{print $2}') sdk_list=${sdk_list//[\" ]/} sdk_list=${sdk_list//,/$'\n'} - sdk_list="$(echo -e "${sdk_list}" | tr -d '[[:space:]]')" local version_info="" while read -r line; do @@ -505,26 +489,16 @@ get_specific_version_from_version() { local json_file="$5" if [ -z "$json_file" ]; then - case "$version" in - latest) - local version_info - version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 - say_verbose "get_specific_version_from_version: version_info=$version_info" - echo "$version_info" | get_version_from_version_info - return 0 - ;; - coherent) - local version_info - version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1 - say_verbose "get_specific_version_from_version: version_info=$version_info" - echo "$version_info" | get_version_from_version_info - return 0 - ;; - *) - echo "$version" - return 0 - ;; - esac + if [[ "$version" == "latest" ]]; then + local version_info + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_version_info + return 0 + else + echo "$version" + return 0 + fi else local version_info version_info="$(parse_jsonfile_for_version "$json_file")" || return 1 @@ -538,6 +512,7 @@ get_specific_version_from_version() { # channel - $2 # normalized_architecture - $3 # specific_version - $4 +# normalized_os - $5 construct_download_link() { eval $invocation @@ -545,17 +520,16 @@ construct_download_link() { local channel="$2" local normalized_architecture="$3" local specific_version="${4//[$'\t\r\n']}" - - local osname - osname="$(get_current_os_name)" || return 1 - + local specific_product_version="$(get_specific_product_version "$1" "$4")" + local osname="$5" + local download_link=null if [[ "$runtime" == "dotnet" ]]; then - download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" elif [[ "$runtime" == "aspnetcore" ]]; then - download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" elif [ -z "$runtime" ]; then - download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz" + download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_product_version-$osname-$normalized_architecture.tar.gz" else return 1 fi @@ -564,6 +538,50 @@ construct_download_link() { return 0 } +# args: +# azure_feed - $1 +# specific_version - $2 +get_specific_product_version() { + # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents + # to resolve the version of what's in the folder, superseding the specified version. + eval $invocation + + local azure_feed="$1" + local specific_version="${2//[$'\t\r\n']}" + local specific_product_version=$specific_version + + local download_link=null + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/productVersion.txt${feed_credential}" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/productVersion.txt${feed_credential}" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/productVersion.txt${feed_credential}" + else + return 1 + fi + + if machine_has "curl" + then + specific_product_version=$(curl -s --fail "$download_link") + if [ $? -ne 0 ] + then + specific_product_version=$specific_version + fi + elif machine_has "wget" + then + specific_product_version=$(wget -qO- "$download_link") + if [ $? -ne 0 ] + then + specific_product_version=$specific_version + fi + fi + specific_product_version="${specific_product_version//[$'\t\r\n']}" + + echo "$specific_product_version" + return 0 +} + # args: # azure_feed - $1 # channel - $2 @@ -684,11 +702,31 @@ extract_dotnet_package() { find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" rm -rf "$temp_out_path" + rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed" if [ "$failed" = true ]; then say_err "Extraction failed" return 1 fi + return 0 +} + +get_http_header_curl() { + eval $invocation + local remote_path="$1" + remote_path_with_credential="${remote_path}${feed_credential}" + curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 " + curl $curl_options "$remote_path_with_credential" || return 1 + return 0 +} + +get_http_header_wget() { + eval $invocation + local remote_path="$1" + remote_path_with_credential="${remote_path}${feed_credential}" + wget_options="-q -S --spider --tries 5 --waitretry 2 --connect-timeout 15 " + wget $wget_options "$remote_path_with_credential" 2>&1 || return 1 + return 0 } # args: @@ -720,44 +758,56 @@ download() { return 0 } +# Updates global variables $http_code and $download_error_msg downloadcurl() { eval $invocation local remote_path="$1" local out_path="${2:-}" - # Append feed_credential as late as possible before calling curl to avoid logging feed_credential - remote_path="${remote_path}${feed_credential}" - + local remote_path_with_credential="${remote_path}${feed_credential}" local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs " local failed=false if [ -z "$out_path" ]; then - curl $curl_options "$remote_path" || failed=true + curl $curl_options "$remote_path_with_credential" || failed=true else - curl $curl_options -o "$out_path" "$remote_path" || failed=true + curl $curl_options -o "$out_path" "$remote_path_with_credential" || failed=true fi if [ "$failed" = true ]; then - say_verbose "Curl download failed" + local response=$(get_http_header_curl $remote_path_with_credential) + http_code=$( echo "$response" | awk '/^HTTP/{print $2}' | tail -1 ) + download_error_msg="Unable to download $remote_path." + if [[ $http_code != 2* ]]; then + download_error_msg+=" Returned HTTP status code: $http_code." + fi + say_verbose "$download_error_msg" return 1 fi return 0 } + +# Updates global variables $http_code and $download_error_msg downloadwget() { eval $invocation local remote_path="$1" local out_path="${2:-}" - # Append feed_credential as late as possible before calling wget to avoid logging feed_credential - remote_path="${remote_path}${feed_credential}" + local remote_path_with_credential="${remote_path}${feed_credential}" local wget_options="--tries 20 --waitretry 2 --connect-timeout 15 " local failed=false if [ -z "$out_path" ]; then - wget -q $wget_options -O - "$remote_path" || failed=true + wget -q $wget_options -O - "$remote_path_with_credential" || failed=true else - wget $wget_options -O "$out_path" "$remote_path" || failed=true + wget $wget_options -O "$out_path" "$remote_path_with_credential" || failed=true fi if [ "$failed" = true ]; then - say_verbose "Wget download failed" + local response=$(get_http_header_wget $remote_path_with_credential) + http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 ) + download_error_msg="Unable to download $remote_path." + if [[ $http_code != 2* ]]; then + download_error_msg+=" Returned HTTP status code: $http_code." + fi + say_verbose "$download_error_msg" return 1 fi return 0 @@ -770,14 +820,18 @@ calculate_vars() { normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" say_verbose "normalized_architecture=$normalized_architecture" + normalized_os="$(get_normalized_os "$user_defined_os")" + say_verbose "normalized_os=$normalized_os" + specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version" "$json_file")" + specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version")" say_verbose "specific_version=$specific_version" if [ -z "$specific_version" ]; then say_err "Could not resolve version information." return 1 fi - download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" + download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")" say_verbose "Constructed primary named payload URL: $download_link" legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false @@ -822,38 +876,76 @@ install_dotnet() { zip_path="$(mktemp "$temporary_file_template")" say_verbose "Zip path: $zip_path" - say "Downloading link: $download_link" # Failures are normal in the non-legacy case for ultimately legacy downloads. # Do not output to stderr, since output to stderr is considered an error. + say "Downloading primary link $download_link" + + # The download function will set variables $http_code and $download_error_msg in case of failure. + http_code=""; download_error_msg="" download "$download_link" "$zip_path" 2>&1 || download_failed=true + primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg" # if the download fails, download the legacy_download_link if [ "$download_failed" = true ]; then - say "Cannot download: $download_link" - + case $primary_path_http_code in + 404) + say "The resource at $download_link is not available." + ;; + *) + say "$primary_path_download_error_msg" + ;; + esac + rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed" if [ "$valid_legacy_download_link" = true ]; then download_failed=false download_link="$legacy_download_link" zip_path="$(mktemp "$temporary_file_template")" say_verbose "Legacy zip path: $zip_path" - say "Downloading legacy link: $download_link" + + say "Downloading legacy link $download_link" + + # The download function will set variables $http_code and $download_error_msg in case of failure. + http_code=""; download_error_msg="" download "$download_link" "$zip_path" 2>&1 || download_failed=true + legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg" if [ "$download_failed" = true ]; then - say "Cannot download: $download_link" + case $legacy_path_http_code in + 404) + say "The resource at $download_link is not available." + ;; + *) + say "$legacy_path_download_error_msg" + ;; + esac + rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed" fi fi fi if [ "$download_failed" = true ]; then - say_err "Could not find/download: \`$asset_name\` with version = $specific_version" - say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + if [[ "$primary_path_http_code" = "404" && ( "$valid_legacy_download_link" = false || "$legacy_path_http_code" = "404") ]]; then + say_err "Could not find \`$asset_name\` with version = $specific_version" + say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + else + say_err "Could not download: \`$asset_name\` with version = $specific_version" + # 404-NotFound is an expected response if it goes from only one of the links, do not show that error. + # If primary path is available (not 404-NotFound) then show the primary error else show the legacy error. + if [ "$primary_path_http_code" != "404" ]; then + say_err "$primary_path_download_error_msg" + return 1 + fi + if [[ "$valid_legacy_download_link" = true && "$legacy_path_http_code" != "404" ]]; then + say_err "$legacy_path_download_error_msg" + return 1 + fi + fi return 1 fi say "Extracting zip from $download_link" - extract_dotnet_package "$zip_path" "$install_root" + extract_dotnet_package "$zip_path" "$install_root" || return 1 # Check if the SDK version is installed; if not, fail the installation. # if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed. @@ -869,12 +961,14 @@ install_dotnet() { fi # Check if the standard SDK version is installed. - say_verbose "Checking installation: version = $specific_version" - if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then + say_verbose "Checking installation: version = $specific_product_version" + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_product_version"; then return 0 fi - say_err "\`$asset_name\` with version = $specific_version failed to install with an unknown error." + # Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm. + say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues." + say_err "\`$asset_name\` with version = $specific_product_version failed to install with an unknown error." return 1 } @@ -900,6 +994,7 @@ runtime="" runtime_id="" override_non_versioned_files=true non_dynamic_parameters="" +user_defined_os="" while [ $# -ne 0 ] do @@ -921,6 +1016,10 @@ do shift architecture="$1" ;; + --os|-[Oo][SS]) + shift + user_defined_os="$1" + ;; --shared-runtime|-[Ss]hared[Rr]untime) say_warning "The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'." if [ -z "$runtime" ]; then @@ -972,6 +1071,7 @@ do shift runtime_id="$1" non_dynamic_parameters+=" $name "\""$1"\""" + say_warning "Use of --runtime-id is obsolete and should be limited to the versions below 2.1. To override architecture, use --architecture option instead. To override OS, use --os option instead." ;; --jsonfile|-[Jj][Ss]on[Ff]ile) shift @@ -1004,8 +1104,6 @@ do echo " -Version" echo " Possible values:" echo " - latest - most latest build on specific channel" - echo " - coherent - most latest coherent build on specific channel" - echo " coherent applies only to SDK downloads" echo " - 3-part version in a format A.B.C - represents specific version of build" echo " examples: 2.0.0-preview2-006120; 1.1.0" echo " -i,--install-dir Install under specified location (see Install Location below)" @@ -1013,6 +1111,11 @@ do echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." echo " --arch,-Architecture,-Arch" echo " Possible values: x64, arm, and arm64" + echo " --os Specifies operating system to be used when selecting the installer." + echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6." + echo " In case any other value is provided, the platform will be determined by the script based on machine configuration." + echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links." + echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information." echo " --runtime Installs a shared runtime only, without the SDK." echo " -Runtime" echo " Possible values:" @@ -1029,14 +1132,15 @@ do echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly." echo " --jsonfile Determines the SDK version from a user specified global.json file." echo " Note: global.json must have a value for 'SDK:Version'" - echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." - echo " -RuntimeId" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" echo "Obsolete parameters:" echo " --shared-runtime The recommended alternative is '--runtime dotnet'." echo " This parameter is obsolete and may be removed in a future version of this script." echo " Installs just the shared runtime bits, not the entire SDK." + echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." + echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1. + echo " For primary links to override OS or/and architecture, use --os and --architecture option instead." echo "" echo "Install Location:" echo " Location is chosen in following order:" @@ -1058,6 +1162,11 @@ if [ "$no_cdn" = true ]; then azure_feed="$uncached_feed" fi +say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" +say "- The SDK needs to be installed without user interaction and without admin rights." +say "- The SDK installation doesn't need to persist across multiple CI runs." +say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.\n" + check_min_reqs calculate_vars script_name=$(basename "$0") @@ -1068,7 +1177,7 @@ if [ "$dry_run" = true ]; then if [ "$valid_legacy_download_link" = true ]; then say "Legacy named payload URL: $legacy_download_link" fi - repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\""" + repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\""" if [[ "$runtime" == "dotnet" ]]; then repeatable_command+=" --runtime "\""dotnet"\""" elif [[ "$runtime" == "aspnetcore" ]]; then @@ -1079,7 +1188,6 @@ if [ "$dry_run" = true ]; then exit 0 fi -check_pre_reqs install_dotnet bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" @@ -1090,4 +1198,6 @@ else say "Binaries of dotnet can be found in $bin_path" fi +say "Note that the script does not resolve dependencies during installation." +say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section." say "Installation finished successfully." From daad66578afffa44a10d678ddeef3d747d43dfa4 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 2 Feb 2021 17:53:24 +0300 Subject: [PATCH 004/108] Resolve comments --- .github/ISSUE_TEMPLATE/bug_report.md | 21 ++++++++++++++++++--- .github/ISSUE_TEMPLATE/feature_request.md | 8 +------- .github/pull_request_template.md | 12 ++++++++---- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 522eec5..70396c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,11 +7,26 @@ assignees: '' --- -**Description:** A clear and concise description of what the bug is. +**Description:** +A clear and concise description of what the bug is. -**Expected behavior:** A description of what you expected to happen. +**Expected behavior:** +A description of what you expected to happen. -**Actual behavior:** A description of what is actually happening. +**Actual behavior:** +A description of what is actually happening. + +**Task version:** +Specify the task version + +**Platform:** +- [ ] Ubuntu +- [ ] macOS +- [ ] Windows + +**Runner type:** +- [ ] Hosted +- [ ] Self-hosted **Repro steps:** A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 76000ca..2e767a3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,15 +2,9 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: enhancement +labels: feature request assignees: '' --- **Description:** Describe your proposal. - -**Related issue:** -Add issue link. - -**Pull request:** -Add pull request link (if it exists). \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 17b416a..169f689 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,11 @@ -**Description**: Describe your changes. +**Description:** +Describe your changes. -**Related issue:** Add link to related issue. +**Related issue:** +Add link to the related issue. -**Documentation changes required:** (Y/N) Mark if documentation changes are required. +**Documentation changes required:** +- [ ] Mark if documentation changes are required. -**Added tests:** (Y/N) Mark if tests were added or updated according changes. \ No newline at end of file +**Test updates** +- [ ] Mark if tests were added or updated to cover the changes. \ No newline at end of file From 975b958e4cac99617e2cd60ca576b214646f38b7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 10:59:17 +0300 Subject: [PATCH 005/108] Debug --- .github/workflows/workflow.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c88f4b8..5d0b059 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,11 +1,16 @@ name: Main workflow on: + workflow_dispatch: pull_request: + paths-ignore: + - '**.md' push: branches: - main - releases/* + paths-ignore: + - '**.md' jobs: build: @@ -13,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-latest, windows-latest, macOS-latest] + operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 @@ -34,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-latest, windows-latest, macOS-latest] + operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 From c47b497cff91ca9b88332d7f08b48d5c47c1f625 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 12:04:13 +0300 Subject: [PATCH 006/108] Minor fix --- .github/ISSUE_TEMPLATE/bug_report.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 70396c9..c78a361 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,12 +10,6 @@ assignees: '' **Description:** A clear and concise description of what the bug is. -**Expected behavior:** -A description of what you expected to happen. - -**Actual behavior:** -A description of what is actually happening. - **Task version:** Specify the task version @@ -30,3 +24,9 @@ Specify the task version **Repro steps:** A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. + +**Expected behavior:** +A description of what you expected to happen. + +**Actual behavior:** +A description of what is actually happening. \ No newline at end of file From 51b6fb2610f6aabf093859fb1eda882634605a5b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 13:08:40 +0300 Subject: [PATCH 007/108] Rework feature request template --- .github/ISSUE_TEMPLATE/feature_request.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 2e767a3..38a0f0c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,3 +8,9 @@ assignees: '' **Description:** Describe your proposal. + +**Justification** +Describe a use case for your proposal. + +**Are you willing to submit a PR?** + \ No newline at end of file From 62230c54093f00c23723ac3f8560755337dc4a89 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 14:37:15 +0300 Subject: [PATCH 008/108] Move toolcache cleanup to separated script --- .github/workflows/workflow.yml | 4 ++++ __tests__/clear-toolcache.ps1 | 1 + 2 files changed, 5 insertions(+) create mode 100644 __tests__/clear-toolcache.ps1 diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 5d0b059..747ab3b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,6 +43,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Clear toolcache + shell: pwsh + run: __tests__/clear-toolcache.ps1 runner.os + - name: Clear tool cache (macOS) if: runner.os == 'macos' run: | diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 new file mode 100644 index 0000000..d8bb85b --- /dev/null +++ b/__tests__/clear-toolcache.ps1 @@ -0,0 +1 @@ +Write-Host $args[0] \ No newline at end of file From 8ada5b555885a4e9bbb816a66c2b781ad26388be Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 14:42:33 +0300 Subject: [PATCH 009/108] Debug --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 747ab3b..ef5814d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v2 - name: Clear toolcache shell: pwsh - run: __tests__/clear-toolcache.ps1 runner.os + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Clear tool cache (macOS) if: runner.os == 'macos' From 7261940ea52b994caa423e53f7e8c1f01525292c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 14:56:08 +0300 Subject: [PATCH 010/108] Debug --- __tests__/clear-toolcache.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index d8bb85b..1e332c7 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -1 +1,4 @@ -Write-Host $args[0] \ No newline at end of file +Write-Host $args[0] + +Write-Host $env:PATH +dotnet --info \ No newline at end of file From a3d47e556cc06347e059f4db4672c7a8dce29e8b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:13:32 +0300 Subject: [PATCH 011/108] Debug --- __tests__/clear-toolcache.ps1 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 1e332c7..1e702c5 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -1,4 +1,26 @@ Write-Host $args[0] -Write-Host $env:PATH +$os = $args[0] + +$linuxDotnetPaths = @("/usr/share/dotnet") +$macOSDotnetPaths = @("/Users/runner/.dotnet") +$windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", "$env:ProgramFiles\dotnet/*") + +$pathsToClear = @() + +if ($os == "linux") { + $pathsToClear = $linuxDotnetPaths +} elseif ($os == "macOS") { + $pathsToClear = $macOSDotnetPaths +} elseif ($os == "windows") { + $pathsToClear = $windowsDotnetPaths +} + +foreach ($path in $pathsToClear) { + if (Test-Path $path) { + Write-Host "Clear $path" + Remove-Item $path -Recurse -Force + } +} + dotnet --info \ No newline at end of file From 843b5197ce500bb7b7e8def544aa80759efad358 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:15:56 +0300 Subject: [PATCH 012/108] Debug --- __tests__/clear-toolcache.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 1e702c5..2f1c2e4 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -8,11 +8,11 @@ $windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", "$env:ProgramFil $pathsToClear = @() -if ($os == "linux") { +if ($os -eq "linux") { $pathsToClear = $linuxDotnetPaths -} elseif ($os == "macOS") { +} elseif ($os -eq "macOS") { $pathsToClear = $macOSDotnetPaths -} elseif ($os == "windows") { +} elseif ($os -eq "windows") { $pathsToClear = $windowsDotnetPaths } From 6ade6c061b6b70bcf9e57331956f91ed08e107f7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:17:48 +0300 Subject: [PATCH 013/108] Minor fix --- __tests__/clear-toolcache.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 2f1c2e4..0867ae5 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -8,11 +8,11 @@ $windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", "$env:ProgramFil $pathsToClear = @() -if ($os -eq "linux") { +if ($os -eq "Linux") { $pathsToClear = $linuxDotnetPaths } elseif ($os -eq "macOS") { $pathsToClear = $macOSDotnetPaths -} elseif ($os -eq "windows") { +} elseif ($os -eq "Windows") { $pathsToClear = $windowsDotnetPaths } From c8cf369c29600fcd2b28a2bf8f347661e971a568 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:20:22 +0300 Subject: [PATCH 014/108] Debug --- .github/workflows/workflow.yml | 39 +++++++++++++++++----------------- __tests__/clear-toolcache.ps1 | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ef5814d..35a8336 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -46,26 +46,25 @@ jobs: - name: Clear toolcache shell: pwsh run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - - - name: Clear tool cache (macOS) - if: runner.os == 'macos' - run: | - echo $PATH - dotnet --info - rm -rf "/Users/runner/.dotnet" - - name: Clear tool cache (Ubuntu) - if: runner.os == 'linux' - run: | - echo $PATH - dotnet --info - rm -rf "/usr/share/dotnet" - - name: Clear tool cache (Windows) - if: runner.os == 'windows' - run: | - echo $env:PATH - dotnet --info - Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue + # - name: Clear tool cache (macOS) + # if: runner.os == 'macos' + # run: | + # echo $PATH + # dotnet --info + # rm -rf "/Users/runner/.dotnet" + # - name: Clear tool cache (Ubuntu) + # if: runner.os == 'linux' + # run: | + # echo $PATH + # dotnet --info + # rm -rf "/usr/share/dotnet" + # - name: Clear tool cache (Windows) + # if: runner.os == 'windows' + # run: | + # echo $env:PATH + # dotnet --info + # Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue + # Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue # Side-by-side install of 2.2 and 3.1 used for the test project - name: Setup dotnet 2.2.402 uses: ./ diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 0867ae5..e76ed28 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -18,7 +18,7 @@ if ($os -eq "Linux") { foreach ($path in $pathsToClear) { if (Test-Path $path) { - Write-Host "Clear $path" + Write-Host "Clear $path path" Remove-Item $path -Recurse -Force } } From 7669e56997538516b130e5236ae34381e3e8a578 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:31:11 +0300 Subject: [PATCH 015/108] Debug --- __tests__/clear-toolcache.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index e76ed28..82a9629 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -2,9 +2,11 @@ Write-Host $args[0] $os = $args[0] -$linuxDotnetPaths = @("/usr/share/dotnet") -$macOSDotnetPaths = @("/Users/runner/.dotnet") -$windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", "$env:ProgramFiles\dotnet/*") +$linuxDotnetPaths = @("/usr/share/dotnet", "$env:HOME/.dotnet") +$macOSDotnetPaths = @("$env:HOME/.dotnet") +$windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", + "$env:ProgramFiles\dotnet/*", + "$env:HOME\.dotnet") $pathsToClear = @() @@ -13,6 +15,7 @@ if ($os -eq "Linux") { } elseif ($os -eq "macOS") { $pathsToClear = $macOSDotnetPaths } elseif ($os -eq "Windows") { + Write-Host $env:LocalAppData $pathsToClear = $windowsDotnetPaths } From 71f0d4bd0729544314c568e7c876323fc7a64d70 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:34:01 +0300 Subject: [PATCH 016/108] Debug --- .github/workflows/workflow.yml | 2 +- __tests__/{clear-toolcache.ps1 => clear-installed-dotnet.ps1} | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) rename __tests__/{clear-toolcache.ps1 => clear-installed-dotnet.ps1} (97%) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 35a8336..4cede84 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v2 - name: Clear toolcache shell: pwsh - run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} # - name: Clear tool cache (macOS) # if: runner.os == 'macos' # run: | diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-installed-dotnet.ps1 similarity index 97% rename from __tests__/clear-toolcache.ps1 rename to __tests__/clear-installed-dotnet.ps1 index 82a9629..2cbfc1d 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -1,5 +1,3 @@ -Write-Host $args[0] - $os = $args[0] $linuxDotnetPaths = @("/usr/share/dotnet", "$env:HOME/.dotnet") From 10ad86dc121b35065e21d69c5f4dee955742b263 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:40:37 +0300 Subject: [PATCH 017/108] Debug --- .github/workflows/workflow.yml | 41 +++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4cede84..3071ac1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,7 +43,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Clear toolcache + - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} # - name: Clear tool cache (macOS) @@ -86,24 +86,33 @@ jobs: run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 # Set new cache before 2 digit install - - name: Set new tool cache (macOS) - if: runner.os == 'macos' - run: | - echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet2" >> $GITHUB_ENV - - name: Set new tool cache (Ubuntu) - if: runner.os == 'linux' - run: | - echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet2" >> $GITHUB_ENV - - name: Set new tool cache (Windows) - if: runner.os == 'windows' - shell: bash - run: | - echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV + # - name: Set new tool cache (macOS) + # if: runner.os == 'macos' + # run: | + # echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet2" >> $GITHUB_ENV + # - name: Set new tool cache (Ubuntu) + # if: runner.os == 'linux' + # run: | + # echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet2" >> $GITHUB_ENV + # - name: Set new tool cache (Windows) + # if: runner.os == 'windows' + # shell: bash + # run: | + # echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - - name: Setup dotnet '2.0' + - name: Clear installed dotnet versions + shell: pwsh + run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + - name: Setup dotnet '3.1' uses: ./ with: - dotnet-version: '2.0' + dotnet-version: '3.1' + - name: Verify dotnet + if: runner.os != 'windows' + run: __tests__/verify-dotnet.sh 3.1 + - name: Verify dotnet (Windows) + if: runner.os == 'windows' + run: __tests__/verify-dotnet.ps1 3.1 # Clear cache before .x version install - name: Set new tool cache (macOS) From 9d49fb8e98b8556448469903a56cad9b47180e33 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 15:54:50 +0300 Subject: [PATCH 018/108] Debug --- .github/workflows/workflow.yml | 41 +++++++++++++++++----------- __tests__/clear-installed-dotnet.ps1 | 6 +++- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3071ac1..1fde5bf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -99,10 +99,10 @@ jobs: # shell: bash # run: | # echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV - # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - name: Setup dotnet '3.1' uses: ./ with: @@ -115,23 +115,32 @@ jobs: run: __tests__/verify-dotnet.ps1 3.1 # Clear cache before .x version install - - name: Set new tool cache (macOS) - if: runner.os == 'macos' - run: | - echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV - - name: Set new tool cache (Ubuntu) - if: runner.os == 'linux' - run: | - echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV - - name: Set new tool cache (Windows) - if: runner.os == 'windows' - shell: bash - run: | - echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV - - name: Setup dotnet 2.0.x + # - name: Set new tool cache (macOS) + # if: runner.os == 'macos' + # run: | + # echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV + # - name: Set new tool cache (Ubuntu) + # if: runner.os == 'linux' + # run: | + # echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV + # - name: Set new tool cache (Windows) + # if: runner.os == 'windows' + # shell: bash + # run: | + # echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV + - name: Clear installed dotnet versions + shell: pwsh + run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + - name: Setup dotnet 3.1.x uses: ./ with: - dotnet-version: 2.0.x + dotnet-version: 3.1.x + - name: Verify dotnet + if: runner.os != 'windows' + run: __tests__/verify-dotnet.sh 3.1 + - name: Verify dotnet (Windows) + if: runner.os == 'windows' + run: __tests__/verify-dotnet.ps1 3.1 # Clear cache before .* version install - name: Set new tool cache (macOS) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index 2cbfc1d..a3ed7b7 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -24,4 +24,8 @@ foreach ($path in $pathsToClear) { } } -dotnet --info \ No newline at end of file +try { + dotnet --info +} catch { + Write-Host "Dotnet was removed successfully" +} \ No newline at end of file From 76a91b1af89ac6842ab4d19d68a4f21637a4ab82 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:10:28 +0300 Subject: [PATCH 019/108] Debug --- .github/workflows/workflow.yml | 82 ++++++--------------------- __tests__/clear-installed-dotnet.ps1 | 6 +- __tests__/sample-csproj/sample.csproj | 2 +- 3 files changed, 18 insertions(+), 72 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1fde5bf..e2c4aa7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -46,25 +46,6 @@ jobs: - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - # - name: Clear tool cache (macOS) - # if: runner.os == 'macos' - # run: | - # echo $PATH - # dotnet --info - # rm -rf "/Users/runner/.dotnet" - # - name: Clear tool cache (Ubuntu) - # if: runner.os == 'linux' - # run: | - # echo $PATH - # dotnet --info - # rm -rf "/usr/share/dotnet" - # - name: Clear tool cache (Windows) - # if: runner.os == 'windows' - # run: | - # echo $env:PATH - # dotnet --info - # Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue - # Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue # Side-by-side install of 2.2 and 3.1 used for the test project - name: Setup dotnet 2.2.402 uses: ./ @@ -85,24 +66,10 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 - # Set new cache before 2 digit install - # - name: Set new tool cache (macOS) - # if: runner.os == 'macos' - # run: | - # echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet2" >> $GITHUB_ENV - # - name: Set new tool cache (Ubuntu) - # if: runner.os == 'linux' - # run: | - # echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet2" >> $GITHUB_ENV - # - name: Set new tool cache (Windows) - # if: runner.os == 'windows' - # shell: bash - # run: | - # echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV + # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - name: Setup dotnet '3.1' uses: ./ with: @@ -113,21 +80,8 @@ jobs: - name: Verify dotnet (Windows) if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 - - # Clear cache before .x version install - # - name: Set new tool cache (macOS) - # if: runner.os == 'macos' - # run: | - # echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV - # - name: Set new tool cache (Ubuntu) - # if: runner.os == 'linux' - # run: | - # echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV - # - name: Set new tool cache (Windows) - # if: runner.os == 'windows' - # shell: bash - # run: | - # echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV + + # Dotnet .x version install - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} @@ -142,25 +96,21 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 - # Clear cache before .* version install - - name: Set new tool cache (macOS) - if: runner.os == 'macos' - run: | - echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet4" >> $GITHUB_ENV - - name: Set new tool cache (Ubuntu) - if: runner.os == 'linux' - run: | - echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet4" >> $GITHUB_ENV - - name: Set new tool cache (Windows) - if: runner.os == 'windows' - shell: bash - run: | - echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet4" >> $GITHUB_ENV - - name: Setup dotnet 2.0.* + # Dotnet .* version install + - name: Clear installed dotnet versions + shell: pwsh + run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + - name: Setup dotnet 5.0.* uses: ./ with: - dotnet-version: 2.0.* - + dotnet-version: 5.0.* + - name: Verify dotnet + if: runner.os != 'windows' + run: __tests__/verify-dotnet.sh 5.0 + - name: Verify dotnet (Windows) + if: runner.os == 'windows' + run: __tests__/verify-dotnet.ps1 5.0 + test-proxy: runs-on: ubuntu-latest container: diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index a3ed7b7..ba87760 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -24,8 +24,4 @@ foreach ($path in $pathsToClear) { } } -try { - dotnet --info -} catch { - Write-Host "Dotnet was removed successfully" -} \ No newline at end of file +Get-Command "dotnet --info" \ No newline at end of file diff --git a/__tests__/sample-csproj/sample.csproj b/__tests__/sample-csproj/sample.csproj index 50fb5e4..14942f9 100644 --- a/__tests__/sample-csproj/sample.csproj +++ b/__tests__/sample-csproj/sample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;netcoreapp2.2 + netcoreapp3.1;netcoreapp2.2;netcoreapp5.0 sample_csproj false From 347456b93444d3066252c43b8e28e297d6d36979 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:15:36 +0300 Subject: [PATCH 020/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index ba87760..84ad0d8 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -24,4 +24,10 @@ foreach ($path in $pathsToClear) { } } -Get-Command "dotnet --info" \ No newline at end of file +try { + Get-Command "dotnet --info" + Write-Host "dotnet was not removed" + exit 1 +} catch { + Write-Host "dotnet was removed successfully" +} \ No newline at end of file From d33a835564b9365331eda335eae3d86b5604423e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:18:47 +0300 Subject: [PATCH 021/108] Debug --- .github/workflows/workflow.yml | 10 +++++----- __tests__/sample-csproj/sample.csproj | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e2c4aa7..d147902 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -100,17 +100,17 @@ jobs: - name: Clear installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - - name: Setup dotnet 5.0.* + - name: Setup dotnet 3.1.* uses: ./ with: - dotnet-version: 5.0.* + dotnet-version: 3.1.* - name: Verify dotnet if: runner.os != 'windows' - run: __tests__/verify-dotnet.sh 5.0 + run: __tests__/verify-dotnet.sh 3.1 - name: Verify dotnet (Windows) if: runner.os == 'windows' - run: __tests__/verify-dotnet.ps1 5.0 - + run: __tests__/verify-dotnet.ps1 3.1 + test-proxy: runs-on: ubuntu-latest container: diff --git a/__tests__/sample-csproj/sample.csproj b/__tests__/sample-csproj/sample.csproj index 14942f9..50fb5e4 100644 --- a/__tests__/sample-csproj/sample.csproj +++ b/__tests__/sample-csproj/sample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;netcoreapp2.2;netcoreapp5.0 + netcoreapp3.1;netcoreapp2.2 sample_csproj false From 45c0959fcd4e047c42b807e38dd2d3d0bc3cccf2 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:24:26 +0300 Subject: [PATCH 022/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index 84ad0d8..7dcbfa7 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -20,7 +20,7 @@ if ($os -eq "Linux") { foreach ($path in $pathsToClear) { if (Test-Path $path) { Write-Host "Clear $path path" - Remove-Item $path -Recurse -Force + # Remove-Item $path -Recurse -Force } } From 53b5bae1f66156ef9945f7f584dbacc73e1d8bd9 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:32:31 +0300 Subject: [PATCH 023/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index 7dcbfa7..c92e0a2 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -20,14 +20,6 @@ if ($os -eq "Linux") { foreach ($path in $pathsToClear) { if (Test-Path $path) { Write-Host "Clear $path path" - # Remove-Item $path -Recurse -Force + Remove-Item $path -Recurse -Force } } - -try { - Get-Command "dotnet --info" - Write-Host "dotnet was not removed" - exit 1 -} catch { - Write-Host "dotnet was removed successfully" -} \ No newline at end of file From 2d640ec7395ad882db7e951d206aeff4630d07fc Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:47:26 +0300 Subject: [PATCH 024/108] Debug --- .github/workflows/workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d147902..b6e2394 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,7 +43,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Clear installed dotnet versions + - name: Remove installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} # Side-by-side install of 2.2 and 3.1 used for the test project @@ -67,7 +67,7 @@ jobs: run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - - name: Clear installed dotnet versions + - name: Remove installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - name: Setup dotnet '3.1' @@ -82,7 +82,7 @@ jobs: run: __tests__/verify-dotnet.ps1 3.1 # Dotnet .x version install - - name: Clear installed dotnet versions + - name: Remove installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - name: Setup dotnet 3.1.x @@ -97,7 +97,7 @@ jobs: run: __tests__/verify-dotnet.ps1 3.1 # Dotnet .* version install - - name: Clear installed dotnet versions + - name: Remove installed dotnet versions shell: pwsh run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} - name: Setup dotnet 3.1.* From 8807004b2045de0e18528bd42bde96456cfdbf7f Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 16:54:18 +0300 Subject: [PATCH 025/108] Minor fix --- __tests__/clear-installed-dotnet.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index c92e0a2..c2e6015 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -13,7 +13,6 @@ if ($os -eq "Linux") { } elseif ($os -eq "macOS") { $pathsToClear = $macOSDotnetPaths } elseif ($os -eq "Windows") { - Write-Host $env:LocalAppData $pathsToClear = $windowsDotnetPaths } From c7eaa2ec00401d4e4141323fdb495b18c50a42be Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 17:03:23 +0300 Subject: [PATCH 026/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index c2e6015..53776e8 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -2,9 +2,9 @@ $os = $args[0] $linuxDotnetPaths = @("/usr/share/dotnet", "$env:HOME/.dotnet") $macOSDotnetPaths = @("$env:HOME/.dotnet") -$windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", +$windowsDotnetPaths = @("$env:HOME\.dotnet", "$env:ProgramFiles\dotnet/*", - "$env:HOME\.dotnet") + "$env:LocalAppData\Microsoft\dotnet/*") $pathsToClear = @() From 6b7d95197756815582cc2dd787c0004b279d3781 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 17:13:32 +0300 Subject: [PATCH 027/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index 53776e8..4e90e7b 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -19,6 +19,6 @@ if ($os -eq "Linux") { foreach ($path in $pathsToClear) { if (Test-Path $path) { Write-Host "Clear $path path" - Remove-Item $path -Recurse -Force + Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue } } From 7bbfec324fdab68e98a08aa4f021b3b29d4a7e61 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 3 Feb 2021 17:46:39 +0300 Subject: [PATCH 028/108] Debug --- __tests__/clear-installed-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-installed-dotnet.ps1 index 4e90e7b..53776e8 100644 --- a/__tests__/clear-installed-dotnet.ps1 +++ b/__tests__/clear-installed-dotnet.ps1 @@ -19,6 +19,6 @@ if ($os -eq "Linux") { foreach ($path in $pathsToClear) { if (Test-Path $path) { Write-Host "Clear $path path" - Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item $path -Recurse -Force } } From c8cb48ba8bfca8d6c1fc4503ac3b4c7c5219ab15 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:19:10 +0300 Subject: [PATCH 029/108] Debug --- .github/workflows/workflow.yml | 47 +++++++++++++++---- ...stalled-dotnet.ps1 => clear-toolcache.ps1} | 0 2 files changed, 37 insertions(+), 10 deletions(-) rename __tests__/{clear-installed-dotnet.ps1 => clear-toolcache.ps1} (100%) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b6e2394..809b3db 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -43,9 +43,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Remove installed dotnet versions + - name: Clear toolcache shell: pwsh - run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} # Side-by-side install of 2.2 and 3.1 used for the test project - name: Setup dotnet 2.2.402 uses: ./ @@ -66,10 +66,19 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 - # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - - name: Remove installed dotnet versions + test-v2: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Clear toolcache shell: pwsh - run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer - name: Setup dotnet '3.1' uses: ./ with: @@ -80,11 +89,20 @@ jobs: - name: Verify dotnet (Windows) if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 - + + test-v3: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 # Dotnet .x version install - - name: Remove installed dotnet versions + - name: Clear toolcache shell: pwsh - run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Setup dotnet 3.1.x uses: ./ with: @@ -96,10 +114,19 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 + test-v4: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 # Dotnet .* version install - - name: Remove installed dotnet versions + - name: Clear toolcache shell: pwsh - run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }} + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} - name: Setup dotnet 3.1.* uses: ./ with: diff --git a/__tests__/clear-installed-dotnet.ps1 b/__tests__/clear-toolcache.ps1 similarity index 100% rename from __tests__/clear-installed-dotnet.ps1 rename to __tests__/clear-toolcache.ps1 From 131ac602dcc3eaf773701ae896f6b2ef7f00ec85 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:22:50 +0300 Subject: [PATCH 030/108] Debug --- .github/workflows/workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 809b3db..62144c5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -83,6 +83,7 @@ jobs: uses: ./ with: dotnet-version: '3.1' + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 @@ -107,6 +108,7 @@ jobs: uses: ./ with: dotnet-version: 3.1.x + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 @@ -131,6 +133,7 @@ jobs: uses: ./ with: dotnet-version: 3.1.* + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 From a1105722ad2e863b8d7fb5d4865711ba2a3a30bd Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:27:28 +0300 Subject: [PATCH 031/108] Debug --- .github/workflows/workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 62144c5..497f1bf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -34,7 +34,7 @@ jobs: if: runner.os != 'windows' run: __tests__/verify-no-unstaged-changes.sh - test: + test-setup-full-version: runs-on: ${{ matrix.operating-system }} strategy: fail-fast: false @@ -66,7 +66,7 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 - test-v2: + test-setup-without-patch-version: runs-on: ${{ matrix.operating-system }} strategy: fail-fast: false @@ -91,7 +91,7 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 - test-v3: + test-setup-x-patch-version: runs-on: ${{ matrix.operating-system }} strategy: fail-fast: false @@ -116,7 +116,7 @@ jobs: if: runner.os == 'windows' run: __tests__/verify-dotnet.ps1 3.1 - test-v4: + test-setup-with-wildcard: runs-on: ${{ matrix.operating-system }} strategy: fail-fast: false From 79735df611b9d310c7adc9eb96f0d766509bd79e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:31:18 +0300 Subject: [PATCH 032/108] Debug --- .github/workflows/workflow.yml | 2 -- __tests__/clear-toolcache.ps1 | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 497f1bf..6f1b61f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -100,7 +100,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - # Dotnet .x version install - name: Clear toolcache shell: pwsh run: __tests__/clear-toolcache.ps1 ${{ runner.os }} @@ -125,7 +124,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - # Dotnet .* version install - name: Clear toolcache shell: pwsh run: __tests__/clear-toolcache.ps1 ${{ runner.os }} diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 53776e8..60f630c 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -1,9 +1,8 @@ $os = $args[0] -$linuxDotnetPaths = @("/usr/share/dotnet", "$env:HOME/.dotnet") +$linuxDotnetPaths = @("/usr/share/dotnet") $macOSDotnetPaths = @("$env:HOME/.dotnet") -$windowsDotnetPaths = @("$env:HOME\.dotnet", - "$env:ProgramFiles\dotnet/*", +$windowsDotnetPaths = @("$env:ProgramFiles\dotnet/*", "$env:LocalAppData\Microsoft\dotnet/*") $pathsToClear = @() From 5dcd27b0bca29a029eba2f8d49ee304173b4df6c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:34:53 +0300 Subject: [PATCH 033/108] Add nuget config file --- __tests__/sample-csproj/nuget.config | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 __tests__/sample-csproj/nuget.config diff --git a/__tests__/sample-csproj/nuget.config b/__tests__/sample-csproj/nuget.config new file mode 100644 index 0000000..bf0c027 --- /dev/null +++ b/__tests__/sample-csproj/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From a0f70ab98c4630730d90c6b74e6e10acda96cfc5 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:38:45 +0300 Subject: [PATCH 034/108] Debug --- .github/workflows/workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6f1b61f..4aef239 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -83,7 +83,6 @@ jobs: uses: ./ with: dotnet-version: '3.1' - source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 @@ -107,7 +106,6 @@ jobs: uses: ./ with: dotnet-version: 3.1.x - source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 @@ -131,7 +129,6 @@ jobs: uses: ./ with: dotnet-version: 3.1.* - source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1 From 5c5ac76dc6fadc8620f389b82e8325fefd95b9ae Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:43:21 +0300 Subject: [PATCH 035/108] Debug --- __tests__/verify-dotnet.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index 098d076..b8f9492 100755 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -3,10 +3,10 @@ if [ -z "$1" ]; then exit 1 fi -if [ ! -f "../nuget.config" ]; then - echo "nuget file not generated correctly" - exit 1 -fi +# if [ ! -f "../nuget.config" ]; then +# echo "nuget file not generated correctly" +# exit 1 +# fi dotnet_version="$(dotnet --version)" echo "Found dotnet version '$dotnet_version'" From 059f1aa99bb356fcf96be16c36994328d6294967 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 09:57:09 +0300 Subject: [PATCH 036/108] Debug --- .github/workflows/workflow.yml | 4 ++++ __tests__/sample-csproj/nuget.config | 6 ------ __tests__/verify-dotnet.ps1 | 5 ----- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 __tests__/sample-csproj/nuget.config diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4aef239..6f8ef44 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -59,6 +59,10 @@ jobs: source-url: https://api.nuget.org/v3/index.json env: NUGET_AUTH_TOKEN: NOTATOKEN + - name: Verify nuget config file + shell: pwsh + run: | + if (-Not (Test-Path "./nuget.config")) { throw "nuget file not generated correctly" } - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1.201 2.2.402 diff --git a/__tests__/sample-csproj/nuget.config b/__tests__/sample-csproj/nuget.config deleted file mode 100644 index bf0c027..0000000 --- a/__tests__/sample-csproj/nuget.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 6af4297..b253807 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -3,11 +3,6 @@ if (!$args[0]) throw "Must supply dotnet version argument" } -if (-Not (Test-Path "../nuget.config")) -{ - throw "nuget file not generated correctly" -} - $dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path } Write-Host "Found '$dotnet'" From 24ed2d0102c6142b845e4c83ba8c051615c1a177 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 10:06:12 +0300 Subject: [PATCH 037/108] Debug --- .github/workflows/workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6f8ef44..0410ea0 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -62,7 +62,8 @@ jobs: - name: Verify nuget config file shell: pwsh run: | - if (-Not (Test-Path "./nuget.config")) { throw "nuget file not generated correctly" } + Get-ChildItem . + # if (-Not (Test-Path "./nuget.config")) { throw "nuget file not generated correctly" } - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1.201 2.2.402 From bb2233aaa552973cd6f9261b3978bf4e88f906c1 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 10:17:46 +0300 Subject: [PATCH 038/108] Debug --- __tests__/verify-dotnet.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index b253807..f0b685f 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -3,6 +3,8 @@ if (!$args[0]) throw "Must supply dotnet version argument" } +Get-ChildItem . + $dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path } Write-Host "Found '$dotnet'" From 831e0d4070905540fe6546765244af68aa64a60e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 10:36:14 +0300 Subject: [PATCH 039/108] Debug --- .github/workflows/workflow.yml | 3 +-- __tests__/verify-dotnet.ps1 | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0410ea0..09340a9 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -62,8 +62,7 @@ jobs: - name: Verify nuget config file shell: pwsh run: | - Get-ChildItem . - # if (-Not (Test-Path "./nuget.config")) { throw "nuget file not generated correctly" } + if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" } - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.1.201 2.2.402 diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index f0b685f..b253807 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -3,8 +3,6 @@ if (!$args[0]) throw "Must supply dotnet version argument" } -Get-ChildItem . - $dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path } Write-Host "Found '$dotnet'" From 993f819e3d126cc05ddc7e925e2035e0ea8eab79 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 10:45:20 +0300 Subject: [PATCH 040/108] Debug --- __tests__/verify-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index b253807..859818f 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if ($version -ne $args[0]) +if ($version -contains $args[0]) { Write-Host "PATH='$env:path'" throw "Unexpected version" From fabe7d52fed84a7ca9f0af153967e72999011ffe Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 11:06:13 +0300 Subject: [PATCH 041/108] Debug --- __tests__/verify-dotnet.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 859818f..9c15d91 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if ($version -contains $args[0]) +if ($version -notmatch $args[0]) { Write-Host "PATH='$env:path'" throw "Unexpected version" @@ -19,7 +19,7 @@ if ($args[1]) # SDKs are listed on multiple lines with the path afterwards in square brackets $version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } Write-Host "Version $version" - if (-not ($version -contains $args[1])) + if ($version -notmatch $args[1]) { Write-Host "PATH='$env:path'" throw "Unexpected version" From 1317beb53a450a50ba1b3117ee67bd093ee7c70e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 11:20:55 +0300 Subject: [PATCH 042/108] Debug --- __tests__/verify-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 9c15d91..3adda6e 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -19,7 +19,7 @@ if ($args[1]) # SDKs are listed on multiple lines with the path afterwards in square brackets $version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } Write-Host "Version $version" - if ($version -notmatch $args[1]) + if (-not ($version -contains $args[1])) { Write-Host "PATH='$env:path'" throw "Unexpected version" From 054db1cac2d9826a33b8d93004fa2f96b0eca666 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 11:43:20 +0300 Subject: [PATCH 043/108] Debug --- .github/workflows/workflow.yml | 18 ++++++++++-------- __tests__/verify-dotnet.sh | 5 ----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 09340a9..8aad83c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -64,11 +64,12 @@ jobs: run: | if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" } - name: Verify dotnet - if: runner.os != 'windows' - run: __tests__/verify-dotnet.sh 3.1.201 2.2.402 - - name: Verify dotnet (Windows) - if: runner.os == 'windows' + # if: runner.os != 'windows' + shell: pwsh run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 + # - name: Verify dotnet (Windows) + # if: runner.os == 'windows' + # run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 test-setup-without-patch-version: runs-on: ${{ matrix.operating-system }} @@ -88,11 +89,12 @@ jobs: with: dotnet-version: '3.1' - name: Verify dotnet - if: runner.os != 'windows' - run: __tests__/verify-dotnet.sh 3.1 - - name: Verify dotnet (Windows) - if: runner.os == 'windows' + # if: runner.os != 'windows' + shell: pwsh run: __tests__/verify-dotnet.ps1 3.1 + # - name: Verify dotnet (Windows) + # if: runner.os == 'windows' + # run: __tests__/verify-dotnet.ps1 3.1 test-setup-x-patch-version: runs-on: ${{ matrix.operating-system }} diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index b8f9492..9807577 100755 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -3,11 +3,6 @@ if [ -z "$1" ]; then exit 1 fi -# if [ ! -f "../nuget.config" ]; then -# echo "nuget file not generated correctly" -# exit 1 -# fi - dotnet_version="$(dotnet --version)" echo "Found dotnet version '$dotnet_version'" if [ -z "$(echo $dotnet_version | grep $1)" ]; then From 44b8627225acba8dee6bb66dafb9ce9c0270f111 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 11:49:04 +0300 Subject: [PATCH 044/108] Debug --- .github/workflows/workflow.yml | 36 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8aad83c..d04b0b6 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -64,12 +64,8 @@ jobs: run: | if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" } - name: Verify dotnet - # if: runner.os != 'windows' shell: pwsh run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 - # - name: Verify dotnet (Windows) - # if: runner.os == 'windows' - # run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402 test-setup-without-patch-version: runs-on: ${{ matrix.operating-system }} @@ -88,13 +84,13 @@ jobs: uses: ./ with: dotnet-version: '3.1' + - name: Setup dotnet '2.2' + uses: ./ + with: + dotnet-version: '2.2' - name: Verify dotnet - # if: runner.os != 'windows' shell: pwsh - run: __tests__/verify-dotnet.ps1 3.1 - # - name: Verify dotnet (Windows) - # if: runner.os == 'windows' - # run: __tests__/verify-dotnet.ps1 3.1 + run: __tests__/verify-dotnet.ps1 3.1 2.2 test-setup-x-patch-version: runs-on: ${{ matrix.operating-system }} @@ -112,12 +108,13 @@ jobs: uses: ./ with: dotnet-version: 3.1.x + - name: Setup dotnet 2.2.x + uses: ./ + with: + dotnet-version: 2.2.x - name: Verify dotnet - if: runner.os != 'windows' - run: __tests__/verify-dotnet.sh 3.1 - - name: Verify dotnet (Windows) - if: runner.os == 'windows' - run: __tests__/verify-dotnet.ps1 3.1 + shell: pwsh + run: __tests__/verify-dotnet.ps1 3.1 2.2 test-setup-with-wildcard: runs-on: ${{ matrix.operating-system }} @@ -135,12 +132,13 @@ jobs: uses: ./ with: dotnet-version: 3.1.* + - name: Setup dotnet 2.2.* + uses: ./ + with: + dotnet-version: 2.2.* - name: Verify dotnet - if: runner.os != 'windows' - run: __tests__/verify-dotnet.sh 3.1 - - name: Verify dotnet (Windows) - if: runner.os == 'windows' - run: __tests__/verify-dotnet.ps1 3.1 + shell: pwsh + run: __tests__/verify-dotnet.ps1 3.1 2.2 test-proxy: runs-on: ubuntu-latest From 7164f75e014cea2eb49d7be8121a3e4eb7a9b0c5 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 12:18:06 +0300 Subject: [PATCH 045/108] Debug --- __tests__/verify-dotnet.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 3adda6e..27e39a0 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -10,18 +10,18 @@ $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" if ($version -notmatch $args[0]) { - Write-Host "PATH='$env:path'" + Write-Host "PATH='$env:PATH'" throw "Unexpected version" } if ($args[1]) { # SDKs are listed on multiple lines with the path afterwards in square brackets - $version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } - Write-Host "Version $version" - if (-not ($version -contains $args[1])) + $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } | Out-String + Write-Host "Version $versions" + if ($version -notmatch $args[1]) { - Write-Host "PATH='$env:path'" + Write-Host "PATH='$env:PATH'" throw "Unexpected version" } } From f4159a6d20a37dca0d7fd824b37f57b0df1a2c42 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 12:22:20 +0300 Subject: [PATCH 046/108] Debug --- __tests__/verify-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 27e39a0..9193ce1 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -19,7 +19,7 @@ if ($args[1]) # SDKs are listed on multiple lines with the path afterwards in square brackets $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } | Out-String Write-Host "Version $versions" - if ($version -notmatch $args[1]) + if ($versions -notmatch $args[1]) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" From 8889c6748fdf4e4b43c23d9a0b3abdc7d6464246 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 12:31:39 +0300 Subject: [PATCH 047/108] Debug --- __tests__/verify-dotnet.ps1 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 9193ce1..eb4dac0 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -17,9 +17,16 @@ if ($version -notmatch $args[0]) if ($args[1]) { # SDKs are listed on multiple lines with the path afterwards in square brackets - $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } | Out-String - Write-Host "Version $versions" - if ($versions -notmatch $args[1]) + $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } + Write-Host "Installed versions: $versions" + $isInstalledVersion = $false + foreach ($version in $versions) { + if ($version.StartsWith($args[1])) { + $isInstalledVersion = $true + break + } + } + if (-not $isInstalledVersion) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" From 5d1a72cb19a61884353d2bfd145cfe93814c2bd5 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 12:39:11 +0300 Subject: [PATCH 048/108] Debug --- __tests__/verify-dotnet.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index eb4dac0..d6300e9 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -21,7 +21,7 @@ if ($args[1]) Write-Host "Installed versions: $versions" $isInstalledVersion = $false foreach ($version in $versions) { - if ($version.StartsWith($args[1])) { + if ($version.StartsWith($args[1].ToString())) { $isInstalledVersion = $true break } From a841c568fd981d4173916359d2392264eb39423b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:26:18 +0300 Subject: [PATCH 049/108] Minor fixes --- __tests__/verify-dotnet.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index d6300e9..cd18c3a 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if ($version -notmatch $args[0]) +if (-not ($version.StartsWith($args[0]))) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" @@ -20,8 +20,10 @@ if ($args[1]) $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } Write-Host "Installed versions: $versions" $isInstalledVersion = $false - foreach ($version in $versions) { - if ($version.StartsWith($args[1].ToString())) { + foreach ($version in $versions) + { + if ($version.StartsWith($args[1].ToString())) + { $isInstalledVersion = $true break } From 92451e3d46dccb81c36610dd65109e995bac9044 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:27:35 +0300 Subject: [PATCH 050/108] Remove workflow dispatch event --- .github/workflows/workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d04b0b6..c6be8ae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,7 +1,6 @@ name: Main workflow on: - workflow_dispatch: pull_request: paths-ignore: - '**.md' From ac1baccba42f820212bdabf6d85e750ed32cef3b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:30:33 +0300 Subject: [PATCH 051/108] Minor fix --- __tests__/verify-dotnet.ps1 | 2 +- __tests__/verify-dotnet.sh | 39 ------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100755 __tests__/verify-dotnet.sh diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index cd18c3a..909fc52 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if (-not ($version.StartsWith($args[0]))) +if (-not ($version.StartsWith($args[0].ToString())) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh deleted file mode 100755 index 9807577..0000000 --- a/__tests__/verify-dotnet.sh +++ /dev/null @@ -1,39 +0,0 @@ -if [ -z "$1" ]; then - echo "Must supply dotnet version argument" - exit 1 -fi - -dotnet_version="$(dotnet --version)" -echo "Found dotnet version '$dotnet_version'" -if [ -z "$(echo $dotnet_version | grep $1)" ]; then - echo "Unexpected version" - exit 1 -fi - -if [ -n "$2" ]; then - dotnet_version="$(dotnet --list-sdks)" - echo "Found dotnet version '$dotnet_version'" - if [ -z "$(echo $dotnet_version | grep $2)" ]; then - echo "Unexpected version" - exit 1 - fi -fi - -echo "Building sample csproj" -dotnet build __tests__/sample-csproj/ --no-cache || exit 1 - -echo "Testing compiled app" -sample_output=$(dotnet test __tests__/sample-csproj/ --no-build) -echo "Sample output: $sample_output" -# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once -if [ -n "$2" ]; then - if [ -z "$(echo $sample_output | grep "Test Run Successful.*Test Run Successful.")" ]; then - echo "Unexpected output" - exit 1 - fi -else - if [ -z "$(echo $sample_output | grep "Test Run Successful.")" ]; then - echo "Unexpected output" - exit 1 - fi -fi \ No newline at end of file From 1c7be1087d5c726130d759e9046fa35ba65b43c8 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:41:45 +0300 Subject: [PATCH 052/108] Debug --- .github/workflows/workflow.yml | 6 ++++-- __tests__/verify-dotnet.ps1 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c6be8ae..6c00c2d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -169,7 +169,8 @@ jobs: env: NUGET_AUTH_TOKEN: NOTATOKEN - name: Verify dotnet - run: __tests__/verify-dotnet.sh 3.1.201 + shell: pwsh + run: __tests__/verify-dotnet.ps1 3.1.201 test-bypass-proxy: runs-on: ubuntu-latest @@ -189,4 +190,5 @@ jobs: env: NUGET_AUTH_TOKEN: NOTATOKEN - name: Verify dotnet - run: __tests__/verify-dotnet.sh 3.1.201 + shell: pwsh + run: __tests__/verify-dotnet.ps1 3.1.201 diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 909fc52..f9b8913 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if (-not ($version.StartsWith($args[0].ToString())) +if (-not ($version.StartsWith($args[0].ToString()))) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" From 4a01d86a5b643f772298b0b722dce83769de22f0 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:48:03 +0300 Subject: [PATCH 053/108] Debug --- .github/workflows/workflow.yml | 6 ++--- __tests__/verify-dotnet.sh | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 __tests__/verify-dotnet.sh diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6c00c2d..c6be8ae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -169,8 +169,7 @@ jobs: env: NUGET_AUTH_TOKEN: NOTATOKEN - name: Verify dotnet - shell: pwsh - run: __tests__/verify-dotnet.ps1 3.1.201 + run: __tests__/verify-dotnet.sh 3.1.201 test-bypass-proxy: runs-on: ubuntu-latest @@ -190,5 +189,4 @@ jobs: env: NUGET_AUTH_TOKEN: NOTATOKEN - name: Verify dotnet - shell: pwsh - run: __tests__/verify-dotnet.ps1 3.1.201 + run: __tests__/verify-dotnet.sh 3.1.201 diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh new file mode 100644 index 0000000..098d076 --- /dev/null +++ b/__tests__/verify-dotnet.sh @@ -0,0 +1,44 @@ +if [ -z "$1" ]; then + echo "Must supply dotnet version argument" + exit 1 +fi + +if [ ! -f "../nuget.config" ]; then + echo "nuget file not generated correctly" + exit 1 +fi + +dotnet_version="$(dotnet --version)" +echo "Found dotnet version '$dotnet_version'" +if [ -z "$(echo $dotnet_version | grep $1)" ]; then + echo "Unexpected version" + exit 1 +fi + +if [ -n "$2" ]; then + dotnet_version="$(dotnet --list-sdks)" + echo "Found dotnet version '$dotnet_version'" + if [ -z "$(echo $dotnet_version | grep $2)" ]; then + echo "Unexpected version" + exit 1 + fi +fi + +echo "Building sample csproj" +dotnet build __tests__/sample-csproj/ --no-cache || exit 1 + +echo "Testing compiled app" +sample_output=$(dotnet test __tests__/sample-csproj/ --no-build) +echo "Sample output: $sample_output" +# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once +if [ -n "$2" ]; then + if [ -z "$(echo $sample_output | grep "Test Run Successful.*Test Run Successful.")" ]; then + echo "Unexpected output" + exit 1 + fi +else + if [ -z "$(echo $sample_output | grep "Test Run Successful.")" ]; then + echo "Unexpected output" + exit 1 + fi +fi \ No newline at end of file From 0cb99b2a127fa95969a52d7d8eebb92d97809409 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:53:22 +0300 Subject: [PATCH 054/108] Debug --- __tests__/verify-dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index 098d076..3854f4a 100644 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -41,4 +41,4 @@ else echo "Unexpected output" exit 1 fi -fi \ No newline at end of file +fi From 58652342477a9270614db65a09f7ee7036270bee Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:54:21 +0300 Subject: [PATCH 055/108] Minor fix --- __tests__/verify-dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index 3854f4a..098d076 100644 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -41,4 +41,4 @@ else echo "Unexpected output" exit 1 fi -fi +fi \ No newline at end of file From cfb7e25be15d2e8fbf4d34d44516903267d0f04d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:55:28 +0300 Subject: [PATCH 056/108] Minor fix --- __tests__/verify-dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index 098d076..3854f4a 100644 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -41,4 +41,4 @@ else echo "Unexpected output" exit 1 fi -fi \ No newline at end of file +fi From 3698118d95491c25a9fa60323efb2209f3474cbc Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:57:55 +0300 Subject: [PATCH 057/108] Minor fix --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 38a0f0c..983cedd 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -10,7 +10,7 @@ assignees: '' Describe your proposal. **Justification** -Describe a use case for your proposal. +Justification or a use case for your proposal. **Are you willing to submit a PR?** \ No newline at end of file From 92ffa484b196d2d3f3a33969a7092fd964acda28 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 14:02:30 +0300 Subject: [PATCH 058/108] Minor fix --- __tests__/verify-dotnet.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 __tests__/verify-dotnet.sh diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh old mode 100644 new mode 100755 From 2a58294d0c6e96b2b009a32ac98dc8225e5a824c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 14:09:28 +0300 Subject: [PATCH 059/108] Minor fix --- __tests__/verify-dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index 3854f4a..098d076 100755 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -41,4 +41,4 @@ else echo "Unexpected output" exit 1 fi -fi +fi \ No newline at end of file From e1655545c187cade15d93627c820efbba733be21 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 14:24:06 +0300 Subject: [PATCH 060/108] Minor fix --- __tests__/clear-toolcache.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 60f630c..1fed65d 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -20,4 +20,4 @@ foreach ($path in $pathsToClear) { Write-Host "Clear $path path" Remove-Item $path -Recurse -Force } -} +} \ No newline at end of file From c1ca14bb7bda20018cb42ffecabcfb3123a245ab Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 14:33:49 +0300 Subject: [PATCH 061/108] Rename stages --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c6be8ae..16b8f24 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -91,7 +91,7 @@ jobs: shell: pwsh run: __tests__/verify-dotnet.ps1 3.1 2.2 - test-setup-x-patch-version: + test-setup-latest-patch-version: runs-on: ${{ matrix.operating-system }} strategy: fail-fast: false From c0d7255256c4869c2d69195ccc14e45f6d72b72b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 15:14:09 +0300 Subject: [PATCH 062/108] Rework cleanup script --- __tests__/clear-toolcache.ps1 | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/__tests__/clear-toolcache.ps1 b/__tests__/clear-toolcache.ps1 index 1fed65d..44ba345 100644 --- a/__tests__/clear-toolcache.ps1 +++ b/__tests__/clear-toolcache.ps1 @@ -1,21 +1,11 @@ -$os = $args[0] - -$linuxDotnetPaths = @("/usr/share/dotnet") -$macOSDotnetPaths = @("$env:HOME/.dotnet") -$windowsDotnetPaths = @("$env:ProgramFiles\dotnet/*", - "$env:LocalAppData\Microsoft\dotnet/*") - -$pathsToClear = @() - -if ($os -eq "Linux") { - $pathsToClear = $linuxDotnetPaths -} elseif ($os -eq "macOS") { - $pathsToClear = $macOSDotnetPaths -} elseif ($os -eq "Windows") { - $pathsToClear = $windowsDotnetPaths +$dotnetPaths = @{ + Linux = @("/usr/share/dotnet") + macOS = @("$env:HOME/.dotnet") + Windows = @("$env:ProgramFiles\dotnet/*", + "$env:LocalAppData\Microsoft\dotnet/*") } -foreach ($path in $pathsToClear) { +foreach ($path in $dotnetPaths[$args[0]]) { if (Test-Path $path) { Write-Host "Clear $path path" Remove-Item $path -Recurse -Force From 8e5c71c8f8310a3f662035df478209f8523d3d41 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 18:26:17 +0300 Subject: [PATCH 063/108] Set ubuntu-latest --- .github/workflows/workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 16b8f24..9ee782a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + operating-system: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + operating-system: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 @@ -71,7 +71,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + operating-system: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 @@ -96,7 +96,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + operating-system: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 @@ -120,7 +120,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-latest, macOS-latest] + operating-system: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout uses: actions/checkout@v2 From efeb86e5cee42cddb7dfb959c5b658905343202a Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 18:48:16 +0300 Subject: [PATCH 064/108] Minor fixes --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/pull_request_template.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 983cedd..c05e753 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -9,7 +9,7 @@ assignees: '' **Description:** Describe your proposal. -**Justification** +**Justification:** Justification or a use case for your proposal. **Are you willing to submit a PR?** diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 169f689..ef54aca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,8 +4,6 @@ Describe your changes. **Related issue:** Add link to the related issue. -**Documentation changes required:** +**Check list:** - [ ] Mark if documentation changes are required. - -**Test updates** - [ ] Mark if tests were added or updated to cover the changes. \ No newline at end of file From 19e6ad3fe098973eef450ce13aaef88c4073e8c4 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:12:47 +0300 Subject: [PATCH 065/108] Add tests --- .github/workflows/test-dotnet.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test-dotnet.yml diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml new file mode 100644 index 0000000..c1a6acb --- /dev/null +++ b/.github/workflows/test-dotnet.yml @@ -0,0 +1,31 @@ +name: Validate dotnet + +on: + pull_request: + paths-ignore: + - '**.md' + push: + branches: + - main + - releases/* + paths-ignore: + - '**.md' + +jobs: + setup-version: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macOS-latest] + dotnet-version: [2.1, 2.2, 3.1, 5.0] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Clear toolcache + shell: pwsh + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: ./ + with: + dotnet-version: "${{ matrix.dotnet-version }}" \ No newline at end of file From f39691d15560cda10180a8d5ab12673ac228b916 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:16:43 +0300 Subject: [PATCH 066/108] Debug --- .github/workflows/test-dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml index c1a6acb..b48fc32 100644 --- a/.github/workflows/test-dotnet.yml +++ b/.github/workflows/test-dotnet.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest] - dotnet-version: [2.1, 2.2, 3.1, 5.0] + dotnet-version: ['2.1', '2.2', '3.0', 3.1', '5.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -28,4 +28,4 @@ jobs: - name: Setup dotnet ${{ matrix.dotnet-version }} uses: ./ with: - dotnet-version: "${{ matrix.dotnet-version }}" \ No newline at end of file + dotnet-version: ${{ matrix.dotnet-version }} \ No newline at end of file From 9427b17c422eb7ce75f9d4d6ea40455f109fb16b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:18:34 +0300 Subject: [PATCH 067/108] Minor fix --- .github/workflows/test-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml index b48fc32..bd2cbe5 100644 --- a/.github/workflows/test-dotnet.yml +++ b/.github/workflows/test-dotnet.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest] - dotnet-version: ['2.1', '2.2', '3.0', 3.1', '5.0'] + dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0'] steps: - name: Checkout uses: actions/checkout@v2 From f311b6d97873314aa296d7a359adb538442b4fc3 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:27:32 +0300 Subject: [PATCH 068/108] Debug --- .github/workflows/test-dotnet.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml index bd2cbe5..248ec3a 100644 --- a/.github/workflows/test-dotnet.yml +++ b/.github/workflows/test-dotnet.yml @@ -28,4 +28,9 @@ jobs: - name: Setup dotnet ${{ matrix.dotnet-version }} uses: ./ with: - dotnet-version: ${{ matrix.dotnet-version }} \ No newline at end of file + dotnet-version: ${{ matrix.dotnet-version }} + - name: Check installed version + shell: pwsh + run: | + $version = & dotnet --version + if (-not $version.StartsWith(${{ matrix.dotnet-version }})) { throw "Unexpected version" } \ No newline at end of file From d99c06115db22035d01520b714a1136661a06f8e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:32:37 +0300 Subject: [PATCH 069/108] Debug --- .github/workflows/test-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml index 248ec3a..5922828 100644 --- a/.github/workflows/test-dotnet.yml +++ b/.github/workflows/test-dotnet.yml @@ -33,4 +33,4 @@ jobs: shell: pwsh run: | $version = & dotnet --version - if (-not $version.StartsWith(${{ matrix.dotnet-version }})) { throw "Unexpected version" } \ No newline at end of file + if (-not $version.StartsWith("${{ matrix.dotnet-version }}")) { throw "Unexpected version" } \ No newline at end of file From c32ed2108bd112acf06d4223c689ed228ab3c6bb Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 10:44:00 +0300 Subject: [PATCH 070/108] Debug --- .github/workflows/test-dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-dotnet.yml b/.github/workflows/test-dotnet.yml index 5922828..b585d56 100644 --- a/.github/workflows/test-dotnet.yml +++ b/.github/workflows/test-dotnet.yml @@ -33,4 +33,5 @@ jobs: shell: pwsh run: | $version = & dotnet --version + Write-Host "Installed version: $version" if (-not $version.StartsWith("${{ matrix.dotnet-version }}")) { throw "Unexpected version" } \ No newline at end of file From ce38f90a9a1180f9da601b2db51d29b769bc65ec Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 5 Feb 2021 11:21:42 +0300 Subject: [PATCH 071/108] Update installer scripts --- externals/install-dotnet.ps1 | 101 ++++++++++++++++++++--------------- externals/install-dotnet.sh | 40 ++++++++++---- 2 files changed, 89 insertions(+), 52 deletions(-) diff --git a/externals/install-dotnet.ps1 b/externals/install-dotnet.ps1 index ff26a05..4646429 100644 --- a/externals/install-dotnet.ps1 +++ b/externals/install-dotnet.ps1 @@ -340,9 +340,8 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) { elseif ($Runtime -eq "aspnetcore") { $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" + $VersionFileUrl = "$UncachedFeed/WindowsDesktop/$Channel/latest.version" } elseif (-not $Runtime) { $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" @@ -438,7 +437,16 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" } elseif ($Runtime -eq "windowsdesktop") { + # The windows desktop runtime is part of the core runtime layout prior to 5.0 $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + if ($SpecificVersion -match '^(\d+)\.(.*)$') + { + $majorVersion = [int]$Matches[1] + if ($majorVersion -ge 5) + { + $PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + } } elseif (-not $Runtime) { $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip" @@ -480,7 +488,16 @@ function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion) { $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt" } elseif ($Runtime -eq "windowsdesktop") { + # The windows desktop runtime is part of the core runtime layout prior to 5.0 $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" + if ($SpecificVersion -match '^(\d+)\.(.*)') + { + $majorVersion = [int]$Matches[1] + if ($majorVersion -ge 5) + { + $ProductVersionTxtURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/productVersion.txt" + } + } } elseif (-not $Runtime) { $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt" @@ -885,10 +902,10 @@ Say "Note that the script does not resolve dependencies during installation." Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies" Say "Installation finished" # SIG # Begin signature block -# MIIjkgYJKoZIhvcNAQcCoIIjgzCCI38CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIjjwYJKoZIhvcNAQcCoIIjgDCCI3wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD2c707qnCLOLIC -# n6Mu5Gr4+Xp68foyZlGlTycnycc5l6CCDYEwggX/MIID56ADAgECAhMzAAABh3IX +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCNsnhcJvx/hXmM +# w8KjuvvIMDBFonhg9XJFc1QwfTyH4aCCDYEwggX/MIID56ADAgECAhMzAAABh3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EXYanUNJomrpT +# MA0GCSqGSIb3DQEBCwUABIIBAAwdcXssUZGO7ho5+NHLjIxLtQk543aKGo+lrRMY +# Q9abE1h/AaaNJl0iGxX4IihNWyfovSfYL3L4eODUBAu68tWSxeceRfWNsb/ZZfUi +# v89hpLssI/Gf1BEgNMA4zCuIGQiC8okusVumEpAhhvCEbSiTTTtBdolTnU/CAKui +# oxaU3R9XkKh1F4oAM26+dJ1J2BLQXPs5afNvvedDsZWNQUPK1sFF3JRfzxiTrwBW +# EJRyflev9gyDoqCHzippgb+6+eti1WTkcA9Q49GIT11S6LOAVqkSC9N7Nqf8ksh8 +# ARdwT8jigpsm+mj7lrVU9upDkhVYhKeO8oiZq95Q53Zkteo= # SIG # End signature block diff --git a/externals/install-dotnet.sh b/externals/install-dotnet.sh index 753a45b..13d30ad 100755 --- a/externals/install-dotnet.sh +++ b/externals/install-dotnet.sh @@ -303,7 +303,7 @@ get_machine_architecture() { echo "arm" return 0 ;; - aarch64) + aarch64|arm64) echo "arm64" return 0 ;; @@ -744,13 +744,31 @@ download() { fi local failed=false - if machine_has "curl"; then - downloadcurl "$remote_path" "$out_path" || failed=true - elif machine_has "wget"; then - downloadwget "$remote_path" "$out_path" || failed=true - else - failed=true - fi + local attempts=0 + while [ $attempts -lt 3 ]; do + attempts=$((attempts+1)) + failed=false + if machine_has "curl"; then + downloadcurl "$remote_path" "$out_path" || failed=true + elif machine_has "wget"; then + downloadwget "$remote_path" "$out_path" || failed=true + else + unset http_code + download_error_msg="Missing dependency: neither curl nor wget was found." + break + fi + + if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then + break + fi + + say "Download attempt #$attempts has failed: $http_code $download_error_msg" + say "Attempt #$((attempts+1)) will start in $((attempts*10)) seconds." + sleep $((attempts*20)) + done + + + if [ "$failed" = true ]; then say_verbose "Download failed: $remote_path" return 1 @@ -761,6 +779,8 @@ download() { # Updates global variables $http_code and $download_error_msg downloadcurl() { eval $invocation + unset http_code + unset download_error_msg local remote_path="$1" local out_path="${2:-}" # Append feed_credential as late as possible before calling curl to avoid logging feed_credential @@ -789,6 +809,8 @@ downloadcurl() { # Updates global variables $http_code and $download_error_msg downloadwget() { eval $invocation + unset http_code + unset download_error_msg local remote_path="$1" local out_path="${2:-}" # Append feed_credential as late as possible before calling wget to avoid logging feed_credential @@ -882,7 +904,6 @@ install_dotnet() { say "Downloading primary link $download_link" # The download function will set variables $http_code and $download_error_msg in case of failure. - http_code=""; download_error_msg="" download "$download_link" "$zip_path" 2>&1 || download_failed=true primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg" @@ -906,7 +927,6 @@ install_dotnet() { say "Downloading legacy link $download_link" # The download function will set variables $http_code and $download_error_msg in case of failure. - http_code=""; download_error_msg="" download "$download_link" "$zip_path" 2>&1 || download_failed=true legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg" From 2d101adc9f90674027b2ceb789aafb94fa33ebc8 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 10 Feb 2021 19:12:20 +0300 Subject: [PATCH 072/108] restrict blank issues --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c78a361..2746c69 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a bug report title: '' -labels: bug +labels: bug, needs triage assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ac9f4b6..2a48739 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: .NET issues url: https://github.com/dotnet/runtime#filing-issues diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c05e753..2c9d47d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: feature request +labels: feature request, needs triage assignees: '' --- From 3c80e97cbdf5b47ad0207d8183c953c6eca77b5d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 11 Feb 2021 10:32:14 +0300 Subject: [PATCH 073/108] Update Linux installer --- externals/install-dotnet.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/externals/install-dotnet.sh b/externals/install-dotnet.sh index 13d30ad..8ffe169 100755 --- a/externals/install-dotnet.sh +++ b/externals/install-dotnet.sh @@ -489,7 +489,7 @@ get_specific_version_from_version() { local json_file="$5" if [ -z "$json_file" ]; then - if [[ "$version" == "latest" ]]; then + if [[ "$version" == "latest" ]]; then local version_info version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 say_verbose "get_specific_version_from_version: version_info=$version_info" @@ -522,7 +522,7 @@ construct_download_link() { local specific_version="${4//[$'\t\r\n']}" local specific_product_version="$(get_specific_product_version "$1" "$4")" local osname="$5" - + local download_link=null if [[ "$runtime" == "dotnet" ]]; then download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" @@ -542,7 +542,7 @@ construct_download_link() { # azure_feed - $1 # specific_version - $2 get_specific_product_version() { - # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents + # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents # to resolve the version of what's in the folder, superseding the specified version. eval $invocation @@ -753,9 +753,8 @@ download() { elif machine_has "wget"; then downloadwget "$remote_path" "$out_path" || failed=true else - unset http_code - download_error_msg="Missing dependency: neither curl nor wget was found." - break + say_err "Missing dependency: neither curl nor wget was found." + exit 1 fi if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then @@ -905,10 +904,10 @@ install_dotnet() { # The download function will set variables $http_code and $download_error_msg in case of failure. download "$download_link" "$zip_path" 2>&1 || download_failed=true - primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg" # if the download fails, download the legacy_download_link if [ "$download_failed" = true ]; then + primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg" case $primary_path_http_code in 404) say "The resource at $download_link is not available." @@ -928,9 +927,9 @@ install_dotnet() { # The download function will set variables $http_code and $download_error_msg in case of failure. download "$download_link" "$zip_path" 2>&1 || download_failed=true - legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg" if [ "$download_failed" = true ]; then + legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg" case $legacy_path_http_code in 404) say "The resource at $download_link is not available." @@ -1132,10 +1131,10 @@ do echo " --arch,-Architecture,-Arch" echo " Possible values: x64, arm, and arm64" echo " --os Specifies operating system to be used when selecting the installer." - echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6." - echo " In case any other value is provided, the platform will be determined by the script based on machine configuration." + echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6." + echo " In case any other value is provided, the platform will be determined by the script based on machine configuration." echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links." - echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information." + echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information." echo " --runtime Installs a shared runtime only, without the SDK." echo " -Runtime" echo " Possible values:" @@ -1160,7 +1159,7 @@ do echo " Installs just the shared runtime bits, not the entire SDK." echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1. - echo " For primary links to override OS or/and architecture, use --os and --architecture option instead." + echo " For primary links to override OS or/and architecture, use --os and --architecture option instead." echo "" echo "Install Location:" echo " Location is chosen in following order:" @@ -1197,7 +1196,7 @@ if [ "$dry_run" = true ]; then if [ "$valid_legacy_download_link" = true ]; then say "Legacy named payload URL: $legacy_download_link" fi - repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\""" + repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\""" if [[ "$runtime" == "dotnet" ]]; then repeatable_command+=" --runtime "\""dotnet"\""" elif [[ "$runtime" == "aspnetcore" ]]; then From ba7e1e215534139b0ddff02eb65b2f2897a85c37 Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Thu, 16 Jul 2020 19:22:49 -0300 Subject: [PATCH 074/108] Include include-prerelease input in action.yml --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index df5b215..ab0fe9e 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: description: 'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url' config-file: description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.' + include-prerelease: + description: 'Whether prerelease versions should be matched with non-exact versions (for example 5.0.0-preview.6 being matched by 5, 5.0, 5.x or 5.0.x). Defaults to false if not provided.' + required: False runs: using: 'node12' main: 'dist/index.js' From 768b4eb7db215baebe4cbdb1e72ad73c00206679 Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Thu, 16 Jul 2020 19:23:46 -0300 Subject: [PATCH 075/108] Implement passing includePrerelase to semver --- dist/index.js | 24 +++++++++++++++++------- src/installer.ts | 25 ++++++++++++++++--------- src/setup-dotnet.ts | 9 ++++++++- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/dist/index.js b/dist/index.js index 15f8a3b..e51206f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7821,7 +7821,9 @@ function run() { } } if (version) { - const dotnetInstaller = new installer.DotnetCoreInstaller(version); + const includePrerelease = (core.getInput('include-prerelease') || 'false').toLowerCase() === + 'true'; + const dotnetInstaller = new installer.DotnetCoreInstaller(version, includePrerelease); yield dotnetInstaller.installDotnet(); } const sourceUrl = core.getInput('source-url'); @@ -16868,7 +16870,6 @@ class DotNetVersionInfo { this.isExactVersionSet = true; return; } - //Note: No support for previews when using generic let parts = version.split('.'); if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat(); @@ -16908,8 +16909,9 @@ class DotNetVersionInfo { } exports.DotNetVersionInfo = DotNetVersionInfo; class DotnetCoreInstaller { - constructor(version) { + constructor(version, includePrerelease = false) { this.version = version; + this.includePrerelease = includePrerelease; } installDotnet() { return __awaiter(this, void 0, void 0, function* () { @@ -17016,14 +17018,22 @@ class DotnetCoreInstaller { const releasesResult = releasesResponse.result || {}; let releasesInfo = releasesResult['releases']; releasesInfo = releasesInfo.filter((releaseInfo) => { - return (semver.satisfies(releaseInfo['sdk']['version'], versionInfo.version()) || - semver.satisfies(releaseInfo['sdk']['version-display'], versionInfo.version())); + return (semver.satisfies(releaseInfo['sdk']['version'], versionInfo.version(), { + includePrerelease: this.includePrerelease + }) || + semver.satisfies(releaseInfo['sdk']['version-display'], versionInfo.version(), { + includePrerelease: this.includePrerelease + })); }); // Exclude versions that are newer than the latest if using not exact let latestSdk = releasesResult['latest-sdk']; - releasesInfo = releasesInfo.filter((releaseInfo) => semver.lte(releaseInfo['sdk']['version'], latestSdk)); + releasesInfo = releasesInfo.filter((releaseInfo) => semver.lte(releaseInfo['sdk']['version'], latestSdk, { + includePrerelease: this.includePrerelease + })); // Sort for latest version - releasesInfo = releasesInfo.sort((a, b) => semver.rcompare(a['sdk']['version'], b['sdk']['version'])); + releasesInfo = releasesInfo.sort((a, b) => semver.rcompare(a['sdk']['version'], b['sdk']['version'], { + includePrerelease: this.includePrerelease + })); if (releasesInfo.length == 0) { throw `Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.`; } diff --git a/src/installer.ts b/src/installer.ts index f0b48a2..d36a24e 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -29,7 +29,6 @@ export class DotNetVersionInfo { return; } - //Note: No support for previews when using generic let parts: string[] = version.split('.'); if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat(); @@ -76,8 +75,9 @@ export class DotNetVersionInfo { } export class DotnetCoreInstaller { - constructor(version: string) { + constructor(version: string, includePrerelease: boolean = false) { this.version = version; + this.includePrerelease = includePrerelease; } public async installDotnet() { @@ -212,13 +212,15 @@ export class DotnetCoreInstaller { let releasesInfo: any[] = releasesResult['releases']; releasesInfo = releasesInfo.filter((releaseInfo: any) => { return ( - semver.satisfies( - releaseInfo['sdk']['version'], - versionInfo.version() - ) || + semver.satisfies(releaseInfo['sdk']['version'], versionInfo.version(), { + includePrerelease: this.includePrerelease + }) || semver.satisfies( releaseInfo['sdk']['version-display'], - versionInfo.version() + versionInfo.version(), + { + includePrerelease: this.includePrerelease + } ) ); }); @@ -227,12 +229,16 @@ export class DotnetCoreInstaller { let latestSdk: string = releasesResult['latest-sdk']; releasesInfo = releasesInfo.filter((releaseInfo: any) => - semver.lte(releaseInfo['sdk']['version'], latestSdk) + semver.lte(releaseInfo['sdk']['version'], latestSdk, { + includePrerelease: this.includePrerelease + }) ); // Sort for latest version releasesInfo = releasesInfo.sort((a, b) => - semver.rcompare(a['sdk']['version'], b['sdk']['version']) + semver.rcompare(a['sdk']['version'], b['sdk']['version'], { + includePrerelease: this.includePrerelease + }) ); if (releasesInfo.length == 0) { @@ -273,6 +279,7 @@ export class DotnetCoreInstaller { } private version: string; + private includePrerelease: boolean; } const DotNetCoreIndexUrl: string = diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index ec804eb..51ace99 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -29,7 +29,14 @@ export async function run() { } if (version) { - const dotnetInstaller = new installer.DotnetCoreInstaller(version); + const includePrerelease: boolean = + (core.getInput('include-prerelease') || 'false').toLowerCase() === + 'true'; + + const dotnetInstaller = new installer.DotnetCoreInstaller( + version, + includePrerelease + ); await dotnetInstaller.installDotnet(); } From 4f71fcfa8188d6a27457cb92dfead2109a4d8954 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Thu, 4 Mar 2021 21:24:09 +0300 Subject: [PATCH 076/108] Add @actions/virtual-environments-owners to CODEOWNERS file --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..e230aaa --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @actions/virtual-environments-owners From 36fa9877a93876f714083cf7deec26bbe66d0dbc Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 17 Mar 2021 12:38:57 +0300 Subject: [PATCH 077/108] try fixing 5.x issue --- dist/index.js | 16 +++++++++++----- src/installer.ts | 25 ++++++++++++++++++------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index 15f8a3b..aadf381 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16876,7 +16876,13 @@ class DotNetVersionInfo { this.throwInvalidVersionFormat(); } let major = this.getVersionNumberOrThrow(parts[0]); - let minor = this.getVersionNumberOrThrow(parts[1]); + let minor; + if (parts[1] === 'x') { + minor = parts[1]; + } + else { + minor = this.getVersionNumberOrThrow(parts[1]); + } this.fullversion = major + '.' + minor; } getVersionNumberOrThrow(input) { @@ -16894,7 +16900,7 @@ class DotNetVersionInfo { } } throwInvalidVersionFormat() { - throw 'Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*'; + throw new Error('Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*'); } /** * If true exacatly one version should be resolved @@ -16997,7 +17003,7 @@ class DotnetCoreInstaller { } console.log(process.env['PATH']); if (resultCode != 0) { - throw `Failed to install dotnet ${resultCode}. ${output}`; + throw new Error(`Failed to install dotnet ${resultCode}. ${output}`); } }); } @@ -17025,7 +17031,7 @@ class DotnetCoreInstaller { // Sort for latest version releasesInfo = releasesInfo.sort((a, b) => semver.rcompare(a['sdk']['version'], b['sdk']['version'])); if (releasesInfo.length == 0) { - throw `Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.`; + throw new Error(`Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.`); } let release = releasesInfo[0]; return release['sdk']['version']; @@ -17046,7 +17052,7 @@ class DotnetCoreInstaller { return versionParts[0] == sdkParts[0]; }); if (releasesInfo.length === 0) { - throw `Could not find info for version ${versionParts.join('.')} at ${DotNetCoreIndexUrl}`; + throw new Error(`Could not find info for version ${versionParts.join('.')} at ${DotNetCoreIndexUrl}`); } return releasesInfo[0]['releases.json']; }); diff --git a/src/installer.ts b/src/installer.ts index f0b48a2..12113e6 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -39,7 +39,12 @@ export class DotNetVersionInfo { } let major = this.getVersionNumberOrThrow(parts[0]); - let minor = this.getVersionNumberOrThrow(parts[1]); + let minor; + if (parts[1] === 'x') { + minor = parts[1]; + } else { + minor = this.getVersionNumberOrThrow(parts[1]); + } this.fullversion = major + '.' + minor; } @@ -60,7 +65,9 @@ export class DotNetVersionInfo { } private throwInvalidVersionFormat() { - throw 'Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*'; + throw new Error( + 'Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*' + ); } /** @@ -187,7 +194,7 @@ export class DotnetCoreInstaller { console.log(process.env['PATH']); if (resultCode != 0) { - throw `Failed to install dotnet ${resultCode}. ${output}`; + throw new Error(`Failed to install dotnet ${resultCode}. ${output}`); } } @@ -236,7 +243,9 @@ export class DotnetCoreInstaller { ); if (releasesInfo.length == 0) { - throw `Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.`; + throw new Error( + `Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.` + ); } let release = releasesInfo[0]; @@ -264,9 +273,11 @@ export class DotnetCoreInstaller { }); if (releasesInfo.length === 0) { - throw `Could not find info for version ${versionParts.join( - '.' - )} at ${DotNetCoreIndexUrl}`; + throw new Error( + `Could not find info for version ${versionParts.join( + '.' + )} at ${DotNetCoreIndexUrl}` + ); } return releasesInfo[0]['releases.json']; From 20afff9c90f1ba52c7fc7198759eba900832b4cf Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 17 Mar 2021 14:56:08 +0300 Subject: [PATCH 078/108] work on fixing test --- __tests__/versionutil.test.ts | 1 - dist/index.js | 12 +++--------- src/installer.ts | 11 +++-------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/__tests__/versionutil.test.ts b/__tests__/versionutil.test.ts index a238688..b816013 100644 --- a/__tests__/versionutil.test.ts +++ b/__tests__/versionutil.test.ts @@ -42,7 +42,6 @@ describe('version tests', () => { '.2.3', '.2.x', '1', - '2.x', '*.*.1', '*.1', '*.', diff --git a/dist/index.js b/dist/index.js index aadf381..9febcc2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16869,20 +16869,14 @@ class DotNetVersionInfo { return; } //Note: No support for previews when using generic - let parts = version.split('.'); + const parts = version.split('.'); if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat(); if (parts.length == 3 && parts[2] !== 'x' && parts[2] !== '*') { this.throwInvalidVersionFormat(); } - let major = this.getVersionNumberOrThrow(parts[0]); - let minor; - if (parts[1] === 'x') { - minor = parts[1]; - } - else { - minor = this.getVersionNumberOrThrow(parts[1]); - } + const major = this.getVersionNumberOrThrow(parts[0]); + const minor = ['x', '*'].includes(parts[1]) ? parts[1] : this.getVersionNumberOrThrow(parts[1]); this.fullversion = major + '.' + minor; } getVersionNumberOrThrow(input) { diff --git a/src/installer.ts b/src/installer.ts index 12113e6..0f3fc42 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -30,7 +30,7 @@ export class DotNetVersionInfo { } //Note: No support for previews when using generic - let parts: string[] = version.split('.'); + const parts: string[] = version.split('.'); if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat(); @@ -38,13 +38,8 @@ export class DotNetVersionInfo { this.throwInvalidVersionFormat(); } - let major = this.getVersionNumberOrThrow(parts[0]); - let minor; - if (parts[1] === 'x') { - minor = parts[1]; - } else { - minor = this.getVersionNumberOrThrow(parts[1]); - } + const major = this.getVersionNumberOrThrow(parts[0]); + const minor = ['x', '*'].includes(parts[1]) ? parts[1] : this.getVersionNumberOrThrow(parts[1]); this.fullversion = major + '.' + minor; } From 6930747f7f2406e54bf60cd86f4e425fb11b7b65 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 17 Mar 2021 14:58:04 +0300 Subject: [PATCH 079/108] create release --- dist/index.js | 4 +++- src/installer.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9febcc2..d80bc1e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16876,7 +16876,9 @@ class DotNetVersionInfo { this.throwInvalidVersionFormat(); } const major = this.getVersionNumberOrThrow(parts[0]); - const minor = ['x', '*'].includes(parts[1]) ? parts[1] : this.getVersionNumberOrThrow(parts[1]); + const minor = ['x', '*'].includes(parts[1]) + ? parts[1] + : this.getVersionNumberOrThrow(parts[1]); this.fullversion = major + '.' + minor; } getVersionNumberOrThrow(input) { diff --git a/src/installer.ts b/src/installer.ts index 0f3fc42..d0bc4f4 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -39,7 +39,9 @@ export class DotNetVersionInfo { } const major = this.getVersionNumberOrThrow(parts[0]); - const minor = ['x', '*'].includes(parts[1]) ? parts[1] : this.getVersionNumberOrThrow(parts[1]); + const minor = ['x', '*'].includes(parts[1]) + ? parts[1] + : this.getVersionNumberOrThrow(parts[1]); this.fullversion = major + '.' + minor; } From 083d63a2ff6892d228bfb580ea7c7a6e0995c2bf Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Thu, 18 Mar 2021 10:18:52 +0300 Subject: [PATCH 080/108] add yesy cases --- __tests__/versionutil.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__tests__/versionutil.test.ts b/__tests__/versionutil.test.ts index b816013..1eb4697 100644 --- a/__tests__/versionutil.test.ts +++ b/__tests__/versionutil.test.ts @@ -13,6 +13,8 @@ describe('version tests', () => { ); each([ + ['3.x', '3.1'], + ['3.*', '3.1'], ['3.1.x', '3.1'], ['1.1.*', '1.1'], ['2.0', '2.0'] From 385512c5e5b7ecd4b4c3ad07e808b5a96c754f33 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Thu, 18 Mar 2021 11:07:32 +0300 Subject: [PATCH 081/108] fix test --- __tests__/versionutil.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/versionutil.test.ts b/__tests__/versionutil.test.ts index 1eb4697..69681da 100644 --- a/__tests__/versionutil.test.ts +++ b/__tests__/versionutil.test.ts @@ -13,8 +13,8 @@ describe('version tests', () => { ); each([ - ['3.x', '3.1'], - ['3.*', '3.1'], + ['3.x', '3.x'], + ['3.*', '3.*'], ['3.1.x', '3.1'], ['1.1.*', '1.1'], ['2.0', '2.0'] From 3707a44789a14a0c870cbc513c20b3d7d9f22960 Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Thu, 25 Mar 2021 20:07:28 -0300 Subject: [PATCH 082/108] Remove unsupported versions of .NET from README. .NET Core 2.2 and 3.0 are no longer supported and should not be in the examples. All versions were changed to pull in the latest revision as people might copy this without checking all accepted version formats and getting the latest revision is good security practice. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66af02f..8eb074b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - dotnet: [ '2.2.103', '3.0', '3.1.x' ] + dotnet: [ '2.1.x', '3.1.x', '5.0.x' ] name: Dotnet ${{ matrix.dotnet }} sample steps: - uses: actions/checkout@v2 @@ -59,7 +59,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: '2.2.103' + dotnet-version: '2.1.x' - name: Setup dotnet uses: actions/setup-dotnet@v1 with: @@ -113,7 +113,7 @@ build: - uses: actions/checkout@main - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.100' # SDK Version to use. + dotnet-version: '3.1.x' # SDK Version to use. ``` # License From 8dcf1ee9bc0f504f4e83b72cbb4b6401c9598b4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 22:18:10 +0000 Subject: [PATCH 083/108] Bump y18n from 4.0.0 to 4.0.1 Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index da3c738..e5a85ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5342,9 +5342,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yaml": { From f2eb44dadd6e1963e97bf8633e8a2391ecd5167b Mon Sep 17 00:00:00 2001 From: Andreas Offenhaeuser Date: Mon, 5 Apr 2021 21:35:43 +0900 Subject: [PATCH 084/108] Update link to pre-installed runner Software --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66af02f..d876e29 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This action sets up a [dotnet core cli](https://github.com/dotnet/cli) environme Please Note: GitHub hosted runners have some versions of the .NET SDK preinstalled. Installed versions are subject to change. Please refer to the documentation -[software installed on github hosted runners](https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners) +[software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software) for .NET SDK versions that are currently available. # Usage From 56d96e897eb0d8e3cfa92e7903dfbb1ba6c6cacb Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 15 Apr 2021 13:28:24 +0300 Subject: [PATCH 085/108] Improve key names validation for keys from user nuget config --- src/authutil.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/authutil.ts b/src/authutil.ts index 463f0d3..218166f 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -25,6 +25,12 @@ export function configAuthentication( writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); } +function isValidKey( + key: string +): boolean { + return /^[0-9\w\-\_\.]+$/i.test(key); +} + function writeFeedToFile( feedUrl: string, existingFileLocation: string, @@ -109,9 +115,9 @@ function writeFeedToFile( xml = xml.ele('packageSourceCredentials'); sourceKeys.forEach(key => { - if (key.indexOf(' ') > -1) { + if (!isValidKey(key)) { throw new Error( - "This action currently can't handle source names with spaces. Remove the space from your repo's NuGet.config and try again." + "Source name can contain letters, numbers, and '-', '_', '.' symbols only, Please, fix source name in NuGet.config and try again." ); } From f9d7f16c0097351003dda0b454255f12bcac7d04 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 15 Apr 2021 13:30:04 +0300 Subject: [PATCH 086/108] Improve key names validation for keys from user nuget config --- src/authutil.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/authutil.ts b/src/authutil.ts index 218166f..d94bf3b 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -25,9 +25,7 @@ export function configAuthentication( writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); } -function isValidKey( - key: string -): boolean { +function isValidKey(key: string): boolean { return /^[0-9\w\-\_\.]+$/i.test(key); } From 596753d72c1d75b2225f1078cdd974131c8b3726 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 15 Apr 2021 13:43:20 +0300 Subject: [PATCH 087/108] Minor fix --- src/authutil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/authutil.ts b/src/authutil.ts index d94bf3b..e7e35b0 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -115,7 +115,7 @@ function writeFeedToFile( sourceKeys.forEach(key => { if (!isValidKey(key)) { throw new Error( - "Source name can contain letters, numbers, and '-', '_', '.' symbols only, Please, fix source name in NuGet.config and try again." + "Source name can contain letters, numbers, and '-', '_', '.' symbols only. Please, fix source name in NuGet.config and try again." ); } From 3b539379a873dc082ea175c5330c4115ac4301ba Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 15 Apr 2021 13:44:48 +0300 Subject: [PATCH 088/108] Minor fix --- src/authutil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/authutil.ts b/src/authutil.ts index e7e35b0..faf98ab 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -26,7 +26,7 @@ export function configAuthentication( } function isValidKey(key: string): boolean { - return /^[0-9\w\-\_\.]+$/i.test(key); + return /^[\w\-\.]+$/i.test(key); } function writeFeedToFile( From b81836a248209f4b7c6a619e301a5bc52962f210 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 15 Apr 2021 13:57:21 +0300 Subject: [PATCH 089/108] Fix index.js --- dist/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 15f8a3b..6ef97ad 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4845,6 +4845,9 @@ function configAuthentication(feedUrl, existingFileLocation = '', processRoot = writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); } exports.configAuthentication = configAuthentication; +function isValidKey(key) { + return /^[\w\-\.]+$/i.test(key); +} function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) { console.log(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`); let xml; @@ -4910,8 +4913,8 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) { } xml = xml.ele('packageSourceCredentials'); sourceKeys.forEach(key => { - if (key.indexOf(' ') > -1) { - throw new Error("This action currently can't handle source names with spaces. Remove the space from your repo's NuGet.config and try again."); + if (!isValidKey(key)) { + throw new Error("Source name can contain letters, numbers, and '-', '_', '.' symbols only. Please, fix source name in NuGet.config and try again."); } xml = xml .ele(key) From 632ccbdfb97bc4aa7484106496626056c0589dd2 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 14:25:42 +0300 Subject: [PATCH 090/108] Support nuget.config name formats --- src/authutil.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/authutil.ts b/src/authutil.ts index 463f0d3..e625f06 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -13,7 +13,7 @@ export function configAuthentication( ) { const existingNuGetConfig: string = path.resolve( processRoot, - existingFileLocation == '' ? 'nuget.config' : existingFileLocation + existingFileLocation == '' ? getExistingNugetConfig(processRoot) : existingFileLocation ); const tempNuGetConfig: string = path.resolve( @@ -25,6 +25,14 @@ export function configAuthentication( writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); } +function getExistingNugetConfig(processRoot: string) { + const configFileNames = fs.readdirSync(processRoot).filter(filename => filename.toLowerCase() == 'nuget.config') + if (configFileNames.length) { + return configFileNames[0]; + } + return 'nuget.config'; +} + function writeFeedToFile( feedUrl: string, existingFileLocation: string, From d08d2193f9160552a35531296eb3fb6a8ce4027a Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 14:26:05 +0300 Subject: [PATCH 091/108] Prettier --- src/authutil.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/authutil.ts b/src/authutil.ts index e625f06..54a2d3f 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -13,7 +13,9 @@ export function configAuthentication( ) { const existingNuGetConfig: string = path.resolve( processRoot, - existingFileLocation == '' ? getExistingNugetConfig(processRoot) : existingFileLocation + existingFileLocation == '' + ? getExistingNugetConfig(processRoot) + : existingFileLocation ); const tempNuGetConfig: string = path.resolve( @@ -26,7 +28,9 @@ export function configAuthentication( } function getExistingNugetConfig(processRoot: string) { - const configFileNames = fs.readdirSync(processRoot).filter(filename => filename.toLowerCase() == 'nuget.config') + const configFileNames = fs + .readdirSync(processRoot) + .filter(filename => filename.toLowerCase() == 'nuget.config'); if (configFileNames.length) { return configFileNames[0]; } From 07b4a80293787dc359f76a18cb064efc41b5719b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 14:26:52 +0300 Subject: [PATCH 092/108] Build index.js --- dist/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 15f8a3b..199f644 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4840,11 +4840,22 @@ const github = __importStar(__webpack_require__(469)); const xmlbuilder = __importStar(__webpack_require__(312)); const xmlParser = __importStar(__webpack_require__(989)); function configAuthentication(feedUrl, existingFileLocation = '', processRoot = process.cwd()) { - const existingNuGetConfig = path.resolve(processRoot, existingFileLocation == '' ? 'nuget.config' : existingFileLocation); + const existingNuGetConfig = path.resolve(processRoot, existingFileLocation == '' + ? getExistingNugetConfig(processRoot) + : existingFileLocation); const tempNuGetConfig = path.resolve(processRoot, '../', 'nuget.config'); writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); } exports.configAuthentication = configAuthentication; +function getExistingNugetConfig(processRoot) { + const configFileNames = fs + .readdirSync(processRoot) + .filter(filename => filename.toLowerCase() == 'nuget.config'); + if (configFileNames.length) { + return configFileNames[0]; + } + return 'nuget.config'; +} function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) { console.log(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`); let xml; From a8c97016ef885352c99d116af10e48786cda01ca Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 16:11:14 +0300 Subject: [PATCH 093/108] Minor fix --- dist/index.js | 4 ++-- src/authutil.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 199f644..3b057b7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4840,7 +4840,7 @@ const github = __importStar(__webpack_require__(469)); const xmlbuilder = __importStar(__webpack_require__(312)); const xmlParser = __importStar(__webpack_require__(989)); function configAuthentication(feedUrl, existingFileLocation = '', processRoot = process.cwd()) { - const existingNuGetConfig = path.resolve(processRoot, existingFileLocation == '' + const existingNuGetConfig = path.resolve(processRoot, existingFileLocation === '' ? getExistingNugetConfig(processRoot) : existingFileLocation); const tempNuGetConfig = path.resolve(processRoot, '../', 'nuget.config'); @@ -4850,7 +4850,7 @@ exports.configAuthentication = configAuthentication; function getExistingNugetConfig(processRoot) { const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() == 'nuget.config'); + .filter(filename => filename.toLowerCase() === 'nuget.config'); if (configFileNames.length) { return configFileNames[0]; } diff --git a/src/authutil.ts b/src/authutil.ts index 54a2d3f..77d66f6 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -13,7 +13,7 @@ export function configAuthentication( ) { const existingNuGetConfig: string = path.resolve( processRoot, - existingFileLocation == '' + existingFileLocation === '' ? getExistingNugetConfig(processRoot) : existingFileLocation ); @@ -30,7 +30,7 @@ export function configAuthentication( function getExistingNugetConfig(processRoot: string) { const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() == 'nuget.config'); + .filter(filename => filename.toLowerCase() === 'nuget.config'); if (configFileNames.length) { return configFileNames[0]; } From 3edf2e9363275b7fcf1d3210aa362f26c07287ab Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 16:16:44 +0300 Subject: [PATCH 094/108] Minor fix --- dist/index.js | 5 +++-- src/authutil.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3b057b7..28caa4a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4848,13 +4848,14 @@ function configAuthentication(feedUrl, existingFileLocation = '', processRoot = } exports.configAuthentication = configAuthentication; function getExistingNugetConfig(processRoot) { + const defaultConfigName = 'nuget.config'; const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() === 'nuget.config'); + .filter(filename => filename.toLowerCase() === defaultConfigName); if (configFileNames.length) { return configFileNames[0]; } - return 'nuget.config'; + return defaultConfigName; } function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) { console.log(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`); diff --git a/src/authutil.ts b/src/authutil.ts index 77d66f6..d8ddef0 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -28,13 +28,14 @@ export function configAuthentication( } function getExistingNugetConfig(processRoot: string) { + const defaultConfigName = 'nuget.config'; const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() === 'nuget.config'); + .filter(filename => filename.toLowerCase() === defaultConfigName); if (configFileNames.length) { return configFileNames[0]; } - return 'nuget.config'; + return defaultConfigName; } function writeFeedToFile( From 291588df6a18de26865f534622042f657f0db06d Mon Sep 17 00:00:00 2001 From: GGG KILLER Date: Thu, 22 Apr 2021 12:22:10 -0300 Subject: [PATCH 095/108] Rerun build --- dist/index.js | 65 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/dist/index.js b/dist/index.js index b55d7c6..e416010 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5048,7 +5048,7 @@ module.exports = {"name":"@octokit/rest","version":"16.28.9","publishConfig":{"a module.exports = XMLDummy = class XMLDummy extends XMLNode { // Initializes a new instance of `XMLDummy` - // `XMLDummy` is a special node representing a node with + // `XMLDummy` is a special node representing a node with // a null value. Dummy nodes are created while recursively // building the XML tree. Simply skipping null values doesn't // work because that would break the recursive chain. @@ -9151,7 +9151,7 @@ function escapeProperty(s) { }; - + // DOM level 1 Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { get: function() { @@ -10956,7 +10956,7 @@ exports.FetchError = FetchError; document(doc, options) { var child, i, j, k, len1, len2, ref, ref1, results; ref = doc.children; - // set a flag so that we don't insert a newline after the last root level node + // set a flag so that we don't insert a newline after the last root level node for (i = j = 0, len1 = ref.length; j < len1; i = ++j) { child = ref[i]; child.isLastRootNode = i === doc.children.length - 1; @@ -12067,14 +12067,14 @@ function authenticationBeforeRequest (state, options) { } else { this.writerOptions.state = WriterState.OpenTag; chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ' 3) this.throwInvalidVersionFormat(); @@ -20470,7 +20469,7 @@ module.exports = set; return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); } - + // Returns debug string for this node debugInfo(name) { name = name || this.name; @@ -22018,7 +22017,7 @@ const validator = __webpack_require__(971); exports.parse = function(xmlData, options, validationOption) { if( validationOption){ if(validationOption === true) validationOption = {} - + const result = validator.validate(xmlData, validationOption); if (result !== true) { throw Error( result.err.msg) @@ -22062,11 +22061,11 @@ function print(xmlNode, indentation){ //console.log(indentation + " \""+index+"\" : [") print(item, indentation2); }) - console.log(indentation + "],") + console.log(indentation + "],") }else{ console.log(indentation + " \""+key+"\" : {") print(node, indentation2); - console.log(indentation + "},") + console.log(indentation + "},") } }); console.log(indentation + "},") @@ -22077,4 +22076,4 @@ function print(xmlNode, indentation){ /***/ }) -/******/ }); +/******/ }); \ No newline at end of file From 0cfae9b3a502f66c528617fcb2928a63014d20a4 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Mon, 26 Apr 2021 16:02:03 +0300 Subject: [PATCH 096/108] Automate releasing new versions of the setup-dotnet action --- .../workflows/release-new-action-version.yml | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 .github/workflows/release-new-action-version.yml diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml new file mode 100644 index 0000000..e294182 --- /dev/null +++ b/.github/workflows/release-new-action-version.yml @@ -0,0 +1,107 @@ +name: Release new action version +on: + workflow_dispatch: + inputs: + TAG_NAME: + description: 'Tag name that the major tag will point to' + required: true + +defaults: + run: + shell: pwsh + +jobs: + update_tag: + name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME }} changes + runs-on: ubuntu-latest + steps: + - name: Check if the ${{ github.event.inputs.TAG_NAME }} tag exists + id: validate-source-tag + uses: actions/github-script@v3 + with: + script: | + try{ + const sourceTag = await github.git.getRef({ + ...context.repo, + ref: "tags/${{ github.event.inputs.TAG_NAME }}" + }); + + const sourceTagSHA = sourceTag.data.object.sha + core.setOutput('source-tag-sha', sourceTagSHA) + } catch (error) { + core.setFailed(error.message); + } + + - name: Validate the ${{ github.event.inputs.TAG_NAME }} tag + run: | + $versionToValidate = "${{ github.event.inputs.TAG_NAME }}".TrimStart("v") + if ($versionToValidate.Split(".").length -lt 3) { + echo "::error::The version specified in the ${{ github.event.inputs.TAG_NAME }} tag is short. You have to specify the full version, for example: 'v1.0.0'" + exit 1 + } + + [Semver]$semanticVersion = $null + if(-not [Semver]::TryParse($versionToValidate, [ref]$semanticVersion)) { + echo "::error::The ${{ github.event.inputs.TAG_NAME }} tag contains unsupported type of version. Only semantic versioning specification is acceptable" + exit 1 + } + + if ($semanticVersion.PreReleaseLabel -or $semanticVersion.BuildLabel) { + echo "::error::You have to specify only stable version to update the major tag" + exit 1 + } + + - name: Update the major tag + id: update-major-tag + uses: actions/github-script@v3 + with: + script: | + try{ + const majorTag = "${{ github.event.inputs.TAG_NAME }}".split(".")[0]; + core.setOutput('major-tag', majorTag) + const refName = `tags/${majorTag}`; + + const { data: foundRefs } = await github.git.listMatchingRefs({ + ...context.repo, + ref: refName + }); + + const matchingRef = foundRefs.find( refObj => refObj.ref.endsWith(refName) ); + + if (matchingRef !== undefined) { + core.info(`Updating the ${majorTag} tag to point to the ${{ github.event.inputs.TAG_NAME }} tag`); + await github.git.updateRef({ + ...context.repo, + ref: refName, + sha: '${{ steps.validate-source-tag.outputs.source-tag-sha }}', + force: true + }); + } else { + core.info(`Creating the ${majorTag} tag from the ${{ github.event.inputs.TAG_NAME }} tag`); + await github.git.createRef({ + ...context.repo, + ref: `refs/${refName}`, + sha: '${{ steps.validate-source-tag.outputs.source-tag-sha }}' + }); + } + } catch (error) { + core.setFailed(error.message); + } + + - name: Send slack message + if: failure() + run: | + curl ` + -X POST ` + -H 'Content-type: application/json' ` + --data '{\"text\":\"Failed to update a major tag for the ${{ github.repository }} action\"}' ` + ${{ secrets.SLACK }} + + - name: Send slack message + if: success() + run: | + curl ` + -X POST ` + -H 'Content-type: application/json' ` + --data '{\"text\":\"The ${{ steps.update-major-tag.outputs.major-tag }} tag has been successfully updated for the ${{ github.repository }} action to include changes from the ${{ github.event.inputs.TAG_NAME }}\"}' ` + ${{ secrets.SLACK }} From bd485b6bd12c87d0f7cf3532cc0b06c7ccdfb5db Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 28 Apr 2021 13:43:02 +0500 Subject: [PATCH 097/108] Add workaround to fix BOM-related error during parsing global.json --- src/setup-dotnet.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index ec804eb..9613476 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -20,7 +20,8 @@ export async function run() { const globalJsonPath = path.join(process.cwd(), 'global.json'); if (fs.existsSync(globalJsonPath)) { const globalJson = JSON.parse( - fs.readFileSync(globalJsonPath, {encoding: 'utf8'}) + // .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649 + fs.readFileSync(globalJsonPath, {encoding: 'utf8'}).trim() ); if (globalJson.sdk && globalJson.sdk.version) { version = globalJson.sdk.version; From 34c59b7d0b3eead847ab3a107acfc0394b3bfa67 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 28 Apr 2021 17:29:56 +0500 Subject: [PATCH 098/108] build dist/index.js --- dist/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 798e67e..caedb46 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7829,7 +7829,9 @@ function run() { core.debug('No version found, trying to find version from global.json'); const globalJsonPath = path.join(process.cwd(), 'global.json'); if (fs.existsSync(globalJsonPath)) { - const globalJson = JSON.parse(fs.readFileSync(globalJsonPath, { encoding: 'utf8' })); + const globalJson = JSON.parse( + // .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649 + fs.readFileSync(globalJsonPath, { encoding: 'utf8' }).trim()); if (globalJson.sdk && globalJson.sdk.version) { version = globalJson.sdk.version; } From d8cff32ae5a509f8bc6acec0e998dda908da7b40 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 5 May 2021 16:45:32 +0300 Subject: [PATCH 099/108] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 18e2c06..f794be5 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,23 @@ See [action.yml](action.yml) Basic: ```yaml steps: -- uses: actions/checkout@main +- uses: actions/checkout@v2 - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel - run: dotnet build ``` +Preview version: +```yml +steps: +- uses: actions@checkout@v2 + with: + dotnet-version: '6.0.x' + include-prerelease: true +- run: dotnet build +``` + Matrix Testing: ```yaml jobs: From b50d70502be6132e84ceee9ea3b9946c2a8283d4 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 5 May 2021 16:47:58 +0300 Subject: [PATCH 100/108] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f794be5..dd3c496 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Preview version: ```yml steps: - uses: actions@checkout@v2 +- uses: actions/setup-dotnet@v1 with: dotnet-version: '6.0.x' include-prerelease: true From effa3e26d27163d31188ae30eb027044d42621b4 Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Thu, 6 May 2021 02:55:59 +0700 Subject: [PATCH 101/108] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd3c496..5efa9ff 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ steps: - run: dotnet build - name: Create the package run: dotnet pack --configuration Release - - name: Publish the package to GPR +- name: Publish the package to GPR run: dotnet nuget push /bin/Release/*.nupkg # Authticates packages to push to Azure Artifacts @@ -104,6 +104,15 @@ steps: NUGET_AUTH_TOKEN: ${{secrets.AZURE_DEVOPS_PAT}} # Note, create a secret with this name in Settings - name: Publish the package to Azure Artifacts run: dotnet nuget push /bin/Release/*.nupkg + +# Authticates packages to push to NuGet Org +- uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x +- name: Publish the package to NuGet Org + run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} ``` ## Environment Variables to use with dotnet From 03d6eb54020249f19af913b533e1759a53d85f97 Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Thu, 6 May 2021 15:10:43 +0700 Subject: [PATCH 102/108] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5efa9ff..c36fe3e 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ steps: - uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x -- name: Publish the package to NuGet Org +- name: Publish the package to nuget.org run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json env: NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} From e1cf912aafa9c45a48fd9084d40fc1a179929065 Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Thu, 6 May 2021 20:10:13 +0700 Subject: [PATCH 103/108] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c36fe3e..ba8c1e5 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ steps: - name: Publish the package to GPR run: dotnet nuget push /bin/Release/*.nupkg -# Authticates packages to push to Azure Artifacts +# Authenticates packages to push to Azure Artifacts - uses: actions/setup-dotnet@v1 with: source-url: https://pkgs.dev.azure.com//_packaging//nuget/v3/index.json @@ -105,7 +105,8 @@ steps: - name: Publish the package to Azure Artifacts run: dotnet nuget push /bin/Release/*.nupkg -# Authticates packages to push to NuGet Org +# Authenticates packages to push to nuget.org. +# It's only the way to push a package to nuget.org feed for macOS/Linus machines due to API key config store limitations. - uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x From 450b56953467f102e9416c3fa013302139a6a590 Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Thu, 6 May 2021 21:38:47 +0700 Subject: [PATCH 104/108] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba8c1e5..7ce5062 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ steps: run: dotnet nuget push /bin/Release/*.nupkg # Authenticates packages to push to nuget.org. -# It's only the way to push a package to nuget.org feed for macOS/Linus machines due to API key config store limitations. +# It's only the way to push a package to nuget.org feed for macOS/Linux machines due to API key config store limitations. - uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x From 5529ce4143dd27cbeb2d793e140433489a2b28a1 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Thu, 27 May 2021 14:39:14 +0300 Subject: [PATCH 105/108] Use the "publish-action" action --- .../workflows/release-new-action-version.yml | 105 +++--------------- 1 file changed, 13 insertions(+), 92 deletions(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index e294182..daa179f 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -1,107 +1,28 @@ name: Release new action version on: + release: + types: [released] workflow_dispatch: inputs: TAG_NAME: description: 'Tag name that the major tag will point to' required: true -defaults: - run: - shell: pwsh +env: + TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} jobs: update_tag: - name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME }} changes + name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes + environment: + name: releaseNewActionVersion runs-on: ubuntu-latest + permissions: + contents: write steps: - - name: Check if the ${{ github.event.inputs.TAG_NAME }} tag exists - id: validate-source-tag - uses: actions/github-script@v3 - with: - script: | - try{ - const sourceTag = await github.git.getRef({ - ...context.repo, - ref: "tags/${{ github.event.inputs.TAG_NAME }}" - }); - - const sourceTagSHA = sourceTag.data.object.sha - core.setOutput('source-tag-sha', sourceTagSHA) - } catch (error) { - core.setFailed(error.message); - } - - - name: Validate the ${{ github.event.inputs.TAG_NAME }} tag - run: | - $versionToValidate = "${{ github.event.inputs.TAG_NAME }}".TrimStart("v") - if ($versionToValidate.Split(".").length -lt 3) { - echo "::error::The version specified in the ${{ github.event.inputs.TAG_NAME }} tag is short. You have to specify the full version, for example: 'v1.0.0'" - exit 1 - } - - [Semver]$semanticVersion = $null - if(-not [Semver]::TryParse($versionToValidate, [ref]$semanticVersion)) { - echo "::error::The ${{ github.event.inputs.TAG_NAME }} tag contains unsupported type of version. Only semantic versioning specification is acceptable" - exit 1 - } - - if ($semanticVersion.PreReleaseLabel -or $semanticVersion.BuildLabel) { - echo "::error::You have to specify only stable version to update the major tag" - exit 1 - } - - - name: Update the major tag + - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag - uses: actions/github-script@v3 + uses: actions/publish-action@v0.1.0 with: - script: | - try{ - const majorTag = "${{ github.event.inputs.TAG_NAME }}".split(".")[0]; - core.setOutput('major-tag', majorTag) - const refName = `tags/${majorTag}`; - - const { data: foundRefs } = await github.git.listMatchingRefs({ - ...context.repo, - ref: refName - }); - - const matchingRef = foundRefs.find( refObj => refObj.ref.endsWith(refName) ); - - if (matchingRef !== undefined) { - core.info(`Updating the ${majorTag} tag to point to the ${{ github.event.inputs.TAG_NAME }} tag`); - await github.git.updateRef({ - ...context.repo, - ref: refName, - sha: '${{ steps.validate-source-tag.outputs.source-tag-sha }}', - force: true - }); - } else { - core.info(`Creating the ${majorTag} tag from the ${{ github.event.inputs.TAG_NAME }} tag`); - await github.git.createRef({ - ...context.repo, - ref: `refs/${refName}`, - sha: '${{ steps.validate-source-tag.outputs.source-tag-sha }}' - }); - } - } catch (error) { - core.setFailed(error.message); - } - - - name: Send slack message - if: failure() - run: | - curl ` - -X POST ` - -H 'Content-type: application/json' ` - --data '{\"text\":\"Failed to update a major tag for the ${{ github.repository }} action\"}' ` - ${{ secrets.SLACK }} - - - name: Send slack message - if: success() - run: | - curl ` - -X POST ` - -H 'Content-type: application/json' ` - --data '{\"text\":\"The ${{ steps.update-major-tag.outputs.major-tag }} tag has been successfully updated for the ${{ github.repository }} action to include changes from the ${{ github.event.inputs.TAG_NAME }}\"}' ` - ${{ secrets.SLACK }} + source-tag: ${{ env.TAG_NAME }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file From 95f03216f8554435e04997caea64c5a29aa1b8e9 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Thu, 27 May 2021 16:20:43 +0300 Subject: [PATCH 106/108] Use permissions as a top-level key --- .github/workflows/release-new-action-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index daa179f..b14c183 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -10,6 +10,8 @@ on: env: TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} +permissions: + contents: write jobs: update_tag: @@ -17,8 +19,6 @@ jobs: environment: name: releaseNewActionVersion runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag From 12194cb2cd328dae8f182d08499688a9fc023d34 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 8 Jun 2021 12:27:57 +0300 Subject: [PATCH 107/108] Update installers scripts --- externals/install-dotnet.ps1 | 579 ++++++++++++++++++++++++++--------- externals/install-dotnet.sh | 428 +++++++++++++++++++++++--- 2 files changed, 819 insertions(+), 188 deletions(-) diff --git a/externals/install-dotnet.ps1 b/externals/install-dotnet.ps1 index 4646429..749684c 100644 --- a/externals/install-dotnet.ps1 +++ b/externals/install-dotnet.ps1 @@ -16,15 +16,27 @@ - LTS - most current supported release - 2-part version in a format A.B - represents a specific release examples: 2.0, 1.0 - - Branch name - examples: release/2.0.0, Master - Note: The version parameter overrides the channel parameter. + - 3-part version in a format A.B.Cxx - represents a specific SDK release + examples: 5.0.1xx, 5.0.2xx + Supported since 5.0 release + Note: The version parameter overrides the channel parameter when any version other than 'latest' is used. +.PARAMETER Quality + Download the latest build of specified quality in the channel. The possible values are: daily, signed, validated, preview, GA. + Works only in combination with channel. Not applicable for current and LTS channels and will be ignored if those channels are used. + For SDK use channel in A.B.Cxx format: using quality together with channel in A.B format is not supported. + Supported since 5.0 release. + Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality. .PARAMETER Version Default: latest Represents a build version on specific channel. Possible values: - latest - most latest build on specific channel - 3-part version in a format A.B.C - represents specific version of build examples: 2.0.0-preview2-006120, 1.1.0 +.PARAMETER Internal + Download internal builds. Requires providing credentials via -FeedCredential parameter. +.PARAMETER FeedCredential + Token to access Azure feed. Used as a query string to append to the Azure feed. + This parameter typically is not specified. .PARAMETER InstallDir Default: %LocalAppData%\Microsoft\dotnet Path to where to install dotnet. Note that binaries will be placed directly in a given directory. @@ -59,9 +71,6 @@ .PARAMETER UncachedFeed This parameter typically is not changed by the user. It allows changing the URL for the Uncached feed used by this installer. -.PARAMETER FeedCredential - Used as a query string to append to the Azure feed. - It allows changing the URL to use non-public blob storage accounts. .PARAMETER ProxyAddress If set, the installer will use the proxy when making web requests .PARAMETER ProxyUseDefaultCredentials @@ -81,11 +90,12 @@ [cmdletbinding()] param( [string]$Channel="LTS", + [string]$Quality, [string]$Version="Latest", + [switch]$Internal, [string]$JSonFile, [string]$InstallDir="", [string]$Architecture="", - [ValidateSet("dotnet", "aspnetcore", "windowsdesktop", IgnoreCase = $false)] [string]$Runtime, [Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")] [switch]$SharedRuntime, @@ -205,7 +215,7 @@ function Get-Machine-Architecture() { function Get-CLIArchitecture-From-Architecture([string]$Architecture) { Say-Invocation $MyInvocation - switch ($Architecture.ToLower()) { + switch ($Architecture.ToLowerInvariant()) { { $_ -eq "" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) } { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" } { $_ -eq "x86" } { return "x86" } @@ -215,6 +225,53 @@ function Get-CLIArchitecture-From-Architecture([string]$Architecture) { } } + +function Get-NormalizedQuality([string]$Quality) { + Say-Invocation $MyInvocation + + if ([string]::IsNullOrEmpty($Quality)) { + return "" + } + + switch ($Quality) { + { @("daily", "signed", "validated", "preview") -contains $_ } { return $Quality.ToLowerInvariant() } + #ga quality is available without specifying quality, so normalizing it to empty + { $_ -eq "ga" } { return "" } + default { throw "'$Quality' is not a supported value for -Quality option. Supported values are: daily, signed, validated, preview, ga. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." } + } +} + +function Get-NormalizedChannel([string]$Channel) { + Say-Invocation $MyInvocation + + if ([string]::IsNullOrEmpty($Channel)) { + return "" + } + + if ($Channel.StartsWith('release/')) { + Say-Warning 'Using branch name with -Channel option is no longer supported with newer releases. Use -Quality option with a channel in X.Y format instead, such as "-Channel 5.0 -Quality Daily."' + } + + switch ($Channel) { + { $_ -eq "lts" } { return "LTS" } + { $_ -eq "current" } { return "current" } + default { return $Channel.ToLowerInvariant() } + } +} + +function Get-NormalizedProduct([string]$Runtime) { + Say-Invocation $MyInvocation + + switch ($Runtime) { + { $_ -eq "dotnet" } { return "dotnet-runtime" } + { $_ -eq "aspnetcore" } { return "aspnetcore-runtime" } + { $_ -eq "windowsdesktop" } { return "windowsdesktop-runtime" } + { [string]::IsNullOrEmpty($_) } { return "dotnet-sdk" } + default { throw "'$Runtime' is not a supported value for -Runtime option, supported values are: dotnet, aspnetcore, windowsdesktop. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." } + } +} + + # The version text returned from the feeds is a 1-line or 2-line string: # For the SDK and the dotnet runtime (2 lines): # Line 1: # commit_hash @@ -243,7 +300,7 @@ function Load-Assembly([string] $Assembly) { } } -function GetHTTPResponse([Uri] $Uri) +function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect, [bool]$DisableFeedCredential) { Invoke-With-Retry( { @@ -270,26 +327,42 @@ function GetHTTPResponse([Uri] $Uri) } } + $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler if($ProxyAddress) { - $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{ Address=$ProxyAddress; UseDefaultCredentials=$ProxyUseDefaultCredentials; BypassList = $ProxyBypassList; } - $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler + } + if ($DisableRedirect) + { + $HttpClientHandler.AllowAutoRedirect = $false } - else { + $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler - $HttpClient = New-Object System.Net.Http.HttpClient - } # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out # 20 minutes allows it to work over much slower connections. $HttpClient.Timeout = New-TimeSpan -Minutes 20 - $Task = $HttpClient.GetAsync("${Uri}${FeedCredential}").ConfigureAwait("false"); + + if ($HeaderOnly){ + $completionOption = [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead + } + else { + $completionOption = [System.Net.Http.HttpCompletionOption]::ResponseContentRead + } + + if ($DisableFeedCredential) { + $UriWithCredential = $Uri + } + else { + $UriWithCredential = "${Uri}${FeedCredential}" + } + + $Task = $HttpClient.GetAsync("$UriWithCredential", $completionOption).ConfigureAwait("false"); $Response = $Task.GetAwaiter().GetResult(); - if (($null -eq $Response) -or (-not ($Response.IsSuccessStatusCode))) { + if (($null -eq $Response) -or ((-not $HeaderOnly) -and (-not ($Response.IsSuccessStatusCode)))) { # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. $DownloadException = [System.Exception] "Unable to download $Uri." @@ -349,6 +422,9 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) { else { throw "Invalid value for `$Runtime" } + + Say-Verbose "Constructed latest.version URL: $VersionFileUrl" + try { $Response = GetHTTPResponse -Uri $VersionFileUrl } @@ -411,7 +487,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, Say-Invocation $MyInvocation if (-not $JSonFile) { - if ($Version.ToLower() -eq "latest") { + if ($Version.ToLowerInvariant() -eq "latest") { $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel return $LatestVersionInfo.Version } @@ -478,58 +554,116 @@ function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [ return $PayloadURL } -function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion) { +function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink) { Say-Invocation $MyInvocation - if ($Runtime -eq "dotnet") { - $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" - } - elseif ($Runtime -eq "aspnetcore") { - $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt" - } - elseif ($Runtime -eq "windowsdesktop") { - # The windows desktop runtime is part of the core runtime layout prior to 5.0 - $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" - if ($SpecificVersion -match '^(\d+)\.(.*)') - { - $majorVersion = [int]$Matches[1] - if ($majorVersion -ge 5) - { - $ProductVersionTxtURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/productVersion.txt" + # Try to get the version number, using the productVersion.txt file located next to the installer file. + $ProductVersionTxtURLs = (Get-Product-Version-Url $AzureFeed $SpecificVersion $PackageDownloadLink -Flattened $true), + (Get-Product-Version-Url $AzureFeed $SpecificVersion $PackageDownloadLink -Flattened $false) + + Foreach ($ProductVersionTxtURL in $ProductVersionTxtURLs) { + Say-Verbose "Checking for the existence of $ProductVersionTxtURL" + + try { + $productVersionResponse = GetHTTPResponse($productVersionTxtUrl) + + if ($productVersionResponse.StatusCode -eq 200) { + $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() + if ($productVersion -ne $SpecificVersion) + { + Say "Using alternate version $productVersion found in $ProductVersionTxtURL" + } + return $productVersion } + else { + Say-Verbose "Got StatusCode $($productVersionResponse.StatusCode) when trying to get productVersion.txt at $productVersionTxtUrl." + } + } + catch { + Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl (Exception: '$($_.Exception.Message)'. )" } } - elseif (-not $Runtime) { - $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt" - } - else { - throw "Invalid value '$Runtime' specified for `$Runtime" + + # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number. + if ([string]::IsNullOrEmpty($PackageDownloadLink)) + { + Say-Verbose "Using the default value '$SpecificVersion' as the product version." + return $SpecificVersion } - Say-Verbose "Checking for existence of $ProductVersionTxtURL" + $productVersion = Get-ProductVersionFromDownloadLink $PackageDownloadLink $SpecificVersion + return $productVersion +} - try { - $productVersionResponse = GetHTTPResponse($productVersionTxtUrl) +function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink, [bool]$Flattened) { + Say-Invocation $MyInvocation - if ($productVersionResponse.StatusCode -eq 200) { - $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() - if ($productVersion -ne $SpecificVersion) - { - Say "Using alternate version $productVersion found in $ProductVersionTxtURL" - } + $majorVersion=$null + if ($SpecificVersion -match '^(\d+)\.(.*)') { + $majorVersion = $Matches[1] -as[int] + } - return $productVersion + $pvFileName='productVersion.txt' + if($Flattened) { + if(-not $Runtime) { + $pvFileName='sdk-productVersion.txt' + } + elseif($Runtime -eq "dotnet") { + $pvFileName='runtime-productVersion.txt' } else { - Say-Verbose "Got StatusCode $($productVersionResponse.StatusCode) trying to get productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion" - $productVersion = $SpecificVersion + $pvFileName="$Runtime-productVersion.txt" } - } catch { - Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion (Exception: '$($_.Exception.Message)' )" - $productVersion = $SpecificVersion } - return $productVersion + if ([string]::IsNullOrEmpty($PackageDownloadLink)) { + if ($Runtime -eq "dotnet") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/$pvFileName" + } + elseif ($Runtime -eq "aspnetcore") { + $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/$pvFileName" + } + elseif ($Runtime -eq "windowsdesktop") { + # The windows desktop runtime is part of the core runtime layout prior to 5.0 + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/$pvFileName" + if ($majorVersion -ne $null -and $majorVersion -ge 5) { + $ProductVersionTxtURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/$pvFileName" + } + } + elseif (-not $Runtime) { + $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/$pvFileName" + } + else { + throw "Invalid value '$Runtime' specified for `$Runtime" + } + } + else { + $ProductVersionTxtURL = $PackageDownloadLink.Substring(0, $PackageDownloadLink.LastIndexOf("/")) + "/$pvFileName" + } + + Say-Verbose "Constructed productVersion link: $ProductVersionTxtURL" + + return $ProductVersionTxtURL +} + +function Get-ProductVersionFromDownloadLink([string]$PackageDownloadLink, [string]$SpecificVersion) +{ + Say-Invocation $MyInvocation + + #product specific version follows the product name + #for filename 'dotnet-sdk-3.1.404-win-x64.zip': the product version is 3.1.400 + $filename = $PackageDownloadLink.Substring($PackageDownloadLink.LastIndexOf("/") + 1) + $filenameParts = $filename.Split('-') + if ($filenameParts.Length -gt 2) + { + $productVersion = $filenameParts[2] + Say-Verbose "Extracted product version '$productVersion' from download link '$PackageDownloadLink'." + } + else { + Say-Verbose "Using the default value '$SpecificVersion' as the product version." + $productVersion = $SpecificVersion + } + return $productVersion } function Get-User-Share-Path() { @@ -702,15 +836,150 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde } } +function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) { + Say-Invocation $MyInvocation + + #quality is not supported for LTS or current channel + if (![string]::IsNullOrEmpty($Quality) -and (@("LTS", "current") -contains $Channel)) { + $Quality = "" + Say-Warning "Specifying quality for current or LTS channel is not supported, the quality will be ignored." + } + Say-Verbose "Retrieving primary payload URL from aka.ms link for channel: '$Channel', quality: '$Quality' product: '$Product', os: 'win', architecture: '$Architecture'." + + #construct aka.ms link + $akaMsLink = "https://aka.ms/dotnet" + if ($Internal) { + $akaMsLink += "/internal" + } + $akaMsLink += "/$Channel" + if (-not [string]::IsNullOrEmpty($Quality)) { + $akaMsLink +="/$Quality" + } + $akaMsLink +="/$Product-win-$Architecture.zip" + Say-Verbose "Constructed aka.ms link: '$akaMsLink'." + $akaMsDownloadLink=$null + + for ($maxRedirections = 9; $maxRedirections -ge 0; $maxRedirections--) + { + #get HTTP response + #do not pass credentials as a part of the $akaMsLink and do not apply credentials in the GetHTTPResponse function + #otherwise the redirect link would have credentials as well + #it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link + $Response= GetHTTPResponse -Uri $akaMsLink -HeaderOnly $true -DisableRedirect $true -DisableFeedCredential $true + Say-Verbose "Received response:`n$Response" + + if ([string]::IsNullOrEmpty($Response)) { + Say-Verbose "The link '$akaMsLink' is not valid: failed to get redirect location. The resource is not available." + return $null + } + + #if HTTP code is 301 (Moved Permanently), the redirect link exists + if ($Response.StatusCode -eq 301) + { + try { + $akaMsDownloadLink = $Response.Headers.GetValues("Location")[0] + + if ([string]::IsNullOrEmpty($akaMsDownloadLink)) { + Say-Verbose "The link '$akaMsLink' is not valid: server returned 301 (Moved Permanently), but the headers do not contain the redirect location." + return $null + } + + Say-Verbose "The redirect location retrieved: '$akaMsDownloadLink'." + # This may yet be a link to another redirection. Attempt to retrieve the page again. + $akaMsLink = $akaMsDownloadLink + continue + } + catch { + Say-Verbose "The link '$akaMsLink' is not valid: failed to get redirect location." + return $null + } + } + elseif ((($Response.StatusCode -lt 300) -or ($Response.StatusCode -ge 400)) -and (-not [string]::IsNullOrEmpty($akaMsDownloadLink))) + { + # Redirections have ended. + return $akaMsDownloadLink + } + + Say-Verbose "The link '$akaMsLink' is not valid: failed to retrieve the redirection location." + return $null + } + + Say-Verbose "Aka.ms links have redirected more than the maximum allowed redirections. This may be caused by a cyclic redirection of aka.ms links." + return $null + +} + Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" Say "- The SDK needs to be installed without user interaction and without admin rights." Say "- The SDK installation doesn't need to persist across multiple CI runs." Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n" +if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) { + $message = "Provide credentials via -FeedCredential parameter." + if ($DryRun) { + Say-Warning "$message" + } else { + throw "$message" + } +} + +#FeedCredential should start with "?", for it to be added to the end of the link. +#adding "?" at the beginning of the FeedCredential if needed. +if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) { + $FeedCredential = "?" + $FeedCredential +} + $CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture -$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile -$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture -$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$NormalizedQuality = Get-NormalizedQuality $Quality +Say-Verbose "Normalized quality: '$NormalizedQuality'" +$NormalizedChannel = Get-NormalizedChannel $Channel +Say-Verbose "Normalized channel: '$NormalizedChannel'" +$NormalizedProduct = Get-NormalizedProduct $Runtime +Say-Verbose "Normalized product: '$NormalizedProduct'" +$DownloadLink = $null + +#try to get download location from aka.ms link +#not applicable when exact version is specified via command or json file +if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) { + $AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $NormalizedProduct -Architecture $CLIArchitecture + + if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){ + if (-not [string]::IsNullOrEmpty($NormalizedQuality)) { + # if quality is specified - exit with error - there is no fallback approach + Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$NormalizedProduct', os: 'win', architecture: '$CLIArchitecture'." + Say-Error "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support." + throw "aka.ms link resolution failure" + } + Say-Verbose "Falling back to latest.version file approach." + } + else { + Say-Verbose "Retrieved primary named payload URL from aka.ms link: '$AkaMsDownloadLink'." + $DownloadLink = $AkaMsDownloadLink + Say-Verbose "Downloading using legacy url will not be attempted." + $LegacyDownloadLink = $null + + #get version from the path + $pathParts = $DownloadLink.Split('/') + if ($pathParts.Length -ge 2) { + $SpecificVersion = $pathParts[$pathParts.Length - 2] + Say-Verbose "Version: '$SpecificVersion'." + } + else { + Say-Error "Failed to extract the version from download link '$DownloadLink'." + } + + #retrieve effective (product) version + $EffectiveVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -PackageDownloadLink $DownloadLink + Say-Verbose "Product version: '$EffectiveVersion'." + } +} + +if ([string]::IsNullOrEmpty($DownloadLink)) { + $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile + $DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture + $LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +} + $InstallRoot = Resolve-Installation-Path $InstallDir Say-Verbose "InstallRoot: $InstallRoot" @@ -718,9 +987,9 @@ $ScriptName = $MyInvocation.MyCommand.Name if ($DryRun) { Say "Payload URLs:" - Say "Primary named payload URL: $DownloadLink" + Say "Primary named payload URL: ${DownloadLink}" if ($LegacyDownloadLink) { - Say "Legacy named payload URL: $LegacyDownloadLink" + Say "Legacy named payload URL: ${LegacyDownloadLink}" } $RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`"" if ($Runtime -eq "dotnet") { @@ -729,11 +998,20 @@ if ($DryRun) { elseif ($Runtime -eq "aspnetcore") { $RepeatableCommand+=" -Runtime `"aspnetcore`"" } + + if (-not [string]::IsNullOrEmpty($NormalizedQuality)) + { + $RepeatableCommand+=" -Quality `"$NormalizedQuality`"" + } + foreach ($key in $MyInvocation.BoundParameters.Keys) { - if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version") -contains $key)) { + if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) { $RepeatableCommand+=" -$key `"$($MyInvocation.BoundParameters[$key])`"" } } + if ($MyInvocation.BoundParameters.Keys -contains "FeedCredential") { + $RepeatableCommand+=" -FeedCredential `"`"" + } Say "Repeatable invocation: $RepeatableCommand" if ($SpecificVersion -ne $EffectiveVersion) { @@ -779,9 +1057,16 @@ if ($isAssetInstalled) { New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null -$installDrive = $((Get-Item $InstallRoot).PSDrive.Name); -$diskInfo = Get-PSDrive -Name $installDrive -if ($diskInfo.Free / 1MB -le 100) { +$installDrive = $((Get-Item $InstallRoot -Force).PSDrive.Name); +$diskInfo = $null +try{ + $diskInfo = Get-PSDrive -Name $installDrive +} +catch{ + Say-Warning "Failed to check the disk space. Installation will continue, but it may fail if you do not have enough disk space." +} + +if ( ($diskInfo -ne $null) -and ($diskInfo.Free / 1MB -le 100)) { throw "There is not enough disk space on drive ${installDrive}:" } @@ -902,42 +1187,42 @@ Say "Note that the script does not resolve dependencies during installation." Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies" Say "Installation finished" # SIG # Begin signature block -# MIIjjwY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94cLRf50QQ4U8Qwggd6MIIFYqADAgECAgphDpDS +# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAnnqH +# tDyYUFaVAkvAK0eqq6nhoL95SZQu3RnpZ7tdQ89QR3++7A+4hrr7V4xxmkB5BObS +# 0YK+MALE02atjwWgPdpYQ68WdLGroJZHkbZdgERG+7tETFl3aKF4KpoSaGOskZXp +# TPnCaMo2PXoAMVMGpsQEQswimZq3IQ3nRQfBlJ0PoMMcN/+Pks8ZTL1BoPYsJpok +# t6cql59q6CypZYIwgyJ892HpttybHKg1ZtQLUlSXccRMlugPgEcNZJagPEgPYni4 +# b11snjRAgf0dyQ0zI9aLXqTxWUU5pCIFiPT0b2wsxzRqCtyGqpkGM8P9GazO8eao +# mVItCYBcJSByBx/pS0cSYwBBHAZxJODUqxSXoSGDvmTfqUJXntnWkL4okok1FiCD +# Z4jpyXOQunb6egIXvkgQ7jb2uO26Ow0m8RwleDvhOMrnHsupiOPbozKroSa6paFt +# VSh89abUSooR8QdZciemmoFhcWkEwFg4spzvYNP4nIs193261WyTaRMZoceGun7G +# CT2Rl653uUj+F+g94c63AhzSq4khdL4HlFIP2ePv29smfUnHtGq6yYFDLnT0q/Y+ +# Di3jwloF8EWkkHRtSuXlFUbTmwr/lDDgbpZiKhLS7CBTDj32I0L5i532+uHczw82 +# oZDmYmYmIUSMbZOgS65h797rj5JJ6OkeEUJoAVwwggd6MIIFYqADAgECAgphDpDS # AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK # V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0 # IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0 @@ -977,55 +1262,55 @@ Say "Installation finished" # xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYA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r1cEsLBV0JaSQT +# QKiOsR+QEbSCNWXQaq/koJrKR5Ugro0y4SmSejnOj5+1/4PlTolFoJAM4pIiT2A1 +# uMs5f219BvkwyRmF32z9EpYQvBdoGpT65DQDuZQ5F6wV1Ph4H7yOzarcdnwPohT+ +# BeH2jrcR3BMAxC3umgRUmTxnzPsoq9FJuRTyHCNygGn+VMImNfk= # SIG # End signature block diff --git a/externals/install-dotnet.sh b/externals/install-dotnet.sh index 8ffe169..1479131 100755 --- a/externals/install-dotnet.sh +++ b/externals/install-dotnet.sh @@ -24,7 +24,7 @@ exec 3>&1 # See if stdout is a terminal if [ -t 1 ] && command -v tput > /dev/null; then # see if it supports colors - ncolors=$(tput colors) + ncolors=$(tput colors || echo 0) if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then bold="$(tput bold || echo)" normal="$(tput sgr0 || echo)" @@ -368,6 +368,75 @@ get_normalized_os() { return 0 } +# args: +# quality - $1 +get_normalized_quality() { + eval $invocation + + local quality="$(to_lowercase "$1")" + if [ ! -z "$quality" ]; then + case "$quality" in + daily | signed | validated | preview) + echo "$quality" + return 0 + ;; + ga) + #ga quality is available without specifying quality, so normalizing it to empty + return 0 + ;; + *) + say_err "'$quality' is not a supported value for --quality option. Supported values are: daily, signed, validated, preview, ga. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." + return 1 + ;; + esac + fi + return 0 +} + +# args: +# channel - $1 +get_normalized_channel() { + eval $invocation + + local channel="$(to_lowercase "$1")" + + if [[ $channel == release/* ]]; then + say_warning 'Using branch name with -Channel option is no longer supported with newer releases. Use -Quality option with a channel in X.Y format instead.'; + fi + + if [ ! -z "$channel" ]; then + case "$channel" in + lts) + echo "LTS" + return 0 + ;; + *) + echo "$channel" + return 0 + ;; + esac + fi + + return 0 +} + +# args: +# runtime - $1 +get_normalized_product() { + eval $invocation + + local runtime="$(to_lowercase "$1")" + if [[ "$runtime" == "dotnet" ]]; then + product="dotnet-runtime" + elif [[ "$runtime" == "aspnetcore" ]]; then + product="aspnetcore-runtime" + elif [ -z "$runtime" ]; then + product="dotnet-sdk" + fi + echo "$product" + return 0 +} + # The version text returned from the feeds is a 1-line or 2-line string: # For the SDK and the dotnet runtime (2 lines): # Line 1: # commit_hash @@ -541,43 +610,131 @@ construct_download_link() { # args: # azure_feed - $1 # specific_version - $2 +# download link - $3 (optional) get_specific_product_version() { # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents # to resolve the version of what's in the folder, superseding the specified version. + # if 'productVersion.txt' is missing but download link is already available, product version will be taken from download link eval $invocation local azure_feed="$1" local specific_version="${2//[$'\t\r\n']}" - local specific_product_version=$specific_version + local package_download_link="" + if [ $# -gt 2 ]; then + local package_download_link="$3" + fi + local specific_product_version=null + + # Try to get the version number, using the productVersion.txt file located next to the installer file. + local download_links=($(get_specific_product_version_url "$azure_feed" "$specific_version" true "$package_download_link") + $(get_specific_product_version_url "$azure_feed" "$specific_version" false "$package_download_link")) + + for download_link in "${download_links[@]}" + do + say_verbose "Checking for the existence of $download_link" + + if machine_has "curl" + then + specific_product_version=$(curl -s --fail "${download_link}${feed_credential}") + if [ $? = 0 ]; then + echo "${specific_product_version//[$'\t\r\n']}" + return 0 + fi + elif machine_has "wget" + then + specific_product_version=$(wget -qO- "${download_link}${feed_credential}") + if [ $? = 0 ]; then + echo "${specific_product_version//[$'\t\r\n']}" + return 0 + fi + fi + done + + # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number. + say_verbose "Failed to get the version using productVersion.txt file. Download link will be parsed instead." + specific_product_version="$(get_product_specific_version_from_download_link "$package_download_link" "$specific_version")" + echo "${specific_product_version//[$'\t\r\n']}" + return 0 +} + +# args: +# azure_feed - $1 +# specific_version - $2 +# is_flattened - $3 +# download link - $4 (optional) +get_specific_product_version_url() { + eval $invocation + + local azure_feed="$1" + local specific_version="$2" + local is_flattened="$3" + local package_download_link="" + if [ $# -gt 3 ]; then + local package_download_link="$4" + fi + + local pvFileName="productVersion.txt" + if [ "$is_flattened" = true ]; then + if [ -z "$runtime" ]; then + pvFileName="sdk-productVersion.txt" + elif [[ "$runtime" == "dotnet" ]]; then + pvFileName="runtime-productVersion.txt" + else + pvFileName="$runtime-productVersion.txt" + fi + fi local download_link=null - if [[ "$runtime" == "dotnet" ]]; then - download_link="$azure_feed/Runtime/$specific_version/productVersion.txt${feed_credential}" - elif [[ "$runtime" == "aspnetcore" ]]; then - download_link="$azure_feed/aspnetcore/Runtime/$specific_version/productVersion.txt${feed_credential}" - elif [ -z "$runtime" ]; then - download_link="$azure_feed/Sdk/$specific_version/productVersion.txt${feed_credential}" + + if [ -z "$package_download_link" ]; then + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/${pvFileName}" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/${pvFileName}" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/${pvFileName}" + else + return 1 + fi else - return 1 + download_link="${package_download_link%/*}/${pvFileName}" fi - if machine_has "curl" - then - specific_product_version=$(curl -s --fail "$download_link") - if [ $? -ne 0 ] - then - specific_product_version=$specific_version - fi - elif machine_has "wget" - then - specific_product_version=$(wget -qO- "$download_link") - if [ $? -ne 0 ] - then - specific_product_version=$specific_version - fi - fi - specific_product_version="${specific_product_version//[$'\t\r\n']}" + say_verbose "Constructed productVersion link: $download_link" + echo "$download_link" + return 0 +} +# args: +# download link - $1 +# specific version - $2 +get_product_specific_version_from_download_link() +{ + eval $invocation + + local download_link="$1" + local specific_version="$2" + local specific_product_version="" + + if [ -z "$download_link" ]; then + echo "$specific_version" + return 0 + fi + + #get filename + filename="${download_link##*/}" + + #product specific version follows the product name + #for filename 'dotnet-sdk-3.1.404-linux-x64.tar.gz': the product version is 3.1.404 + IFS='-' + read -ra filename_elems <<< "$filename" + count=${#filename_elems[@]} + if [[ "$count" -gt 2 ]]; then + specific_product_version="${filename_elems[2]}" + else + specific_product_version=$specific_version + fi + unset IFS; echo "$specific_product_version" return 0 } @@ -711,19 +868,62 @@ extract_dotnet_package() { return 0 } +# args: +# remote_path - $1 +# disable_feed_credential - $2 +get_http_header() +{ + eval $invocation + local remote_path="$1" + local disable_feed_credential="$2" + + local failed=false + local response + if machine_has "curl"; then + get_http_header_curl $remote_path $disable_feed_credential || failed=true + elif machine_has "wget"; then + get_http_header_wget $remote_path $disable_feed_credential || failed=true + else + failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Failed to get HTTP header: '$remote_path'." + return 1 + fi + return 0 +} + +# args: +# remote_path - $1 +# disable_feed_credential - $2 get_http_header_curl() { eval $invocation local remote_path="$1" - remote_path_with_credential="${remote_path}${feed_credential}" + local disable_feed_credential="$2" + + remote_path_with_credential="$remote_path" + if [ "$disable_feed_credential" = false ]; then + remote_path_with_credential+="$feed_credential" + fi + curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 " curl $curl_options "$remote_path_with_credential" || return 1 return 0 } +# args: +# remote_path - $1 +# disable_feed_credential - $2 get_http_header_wget() { eval $invocation local remote_path="$1" - remote_path_with_credential="${remote_path}${feed_credential}" + local disable_feed_credential="$2" + + remote_path_with_credential="$remote_path" + if [ "$disable_feed_credential" = false ]; then + remote_path_with_credential+="$feed_credential" + fi + wget_options="-q -S --spider --tries 5 --waitretry 2 --connect-timeout 15 " wget $wget_options "$remote_path_with_credential" 2>&1 || return 1 return 0 @@ -763,7 +963,7 @@ download() { say "Download attempt #$attempts has failed: $http_code $download_error_msg" say "Attempt #$((attempts+1)) will start in $((attempts*10)) seconds." - sleep $((attempts*20)) + sleep $((attempts*10)) done @@ -783,6 +983,7 @@ downloadcurl() { local remote_path="$1" local out_path="${2:-}" # Append feed_credential as late as possible before calling curl to avoid logging feed_credential + # Avoid passing URI with credentials to functions: note, most of them echoing parameters of invocation in verbose output. local remote_path_with_credential="${remote_path}${feed_credential}" local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs " local failed=false @@ -792,7 +993,8 @@ downloadcurl() { curl $curl_options -o "$out_path" "$remote_path_with_credential" || failed=true fi if [ "$failed" = true ]; then - local response=$(get_http_header_curl $remote_path_with_credential) + local disable_feed_credential=false + local response=$(get_http_header_curl $remote_path $disable_feed_credential) http_code=$( echo "$response" | awk '/^HTTP/{print $2}' | tail -1 ) download_error_msg="Unable to download $remote_path." if [[ $http_code != 2* ]]; then @@ -822,7 +1024,8 @@ downloadwget() { wget $wget_options -O "$out_path" "$remote_path_with_credential" || failed=true fi if [ "$failed" = true ]; then - local response=$(get_http_header_wget $remote_path_with_credential) + local disable_feed_credential=false + local response=$(get_http_header_wget $remote_path $disable_feed_credential) http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 ) download_error_msg="Unable to download $remote_path." if [[ $http_code != 2* ]]; then @@ -834,15 +1037,115 @@ downloadwget() { return 0 } +get_download_link_from_aka_ms() { + eval $invocation + + #quality is not supported for LTS or current channel + if [[ ! -z "$normalized_quality" && ("$normalized_channel" == "LTS" || "$normalized_channel" == "current") ]]; then + normalized_quality="" + say_warning "Specifying quality for current or LTS channel is not supported, the quality will be ignored." + fi + + say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'." + + #construct aka.ms link + aka_ms_link="https://aka.ms/dotnet" + if [ "$internal" = true ]; then + aka_ms_link="$aka_ms_link/internal" + fi + aka_ms_link="$aka_ms_link/$normalized_channel" + if [[ ! -z "$normalized_quality" ]]; then + aka_ms_link="$aka_ms_link/$normalized_quality" + fi + aka_ms_link="$aka_ms_link/$normalized_product-$normalized_os-$normalized_architecture.tar.gz" + say_verbose "Constructed aka.ms link: '$aka_ms_link'." + + #get HTTP response + #do not pass credentials as a part of the $aka_ms_link and do not apply credentials in the get_http_header function + #otherwise the redirect link would have credentials as well + #it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link + disable_feed_credential=true + response="$(get_http_header $aka_ms_link $disable_feed_credential)" + + say_verbose "Received response: $response" + # Get results of all the redirects. + http_codes=$( echo "$response" | awk '$1 ~ /^HTTP/ {print $2}' ) + # They all need to be 301, otherwise some links are broken (except for the last, which is not a redirect but 200 or 404). + broken_redirects=$( echo "$http_codes" | sed '$d' | grep -v '301' ) + + # All HTTP codes are 301 (Moved Permanently), the redirect link exists. + if [[ -z "$broken_redirects" ]]; then + aka_ms_download_link=$( echo "$response" | awk '$1 ~ /^Location/{print $2}' | tail -1 | tr -d '\r') + + if [[ -z "$aka_ms_download_link" ]]; then + say_verbose "The aka.ms link '$aka_ms_link' is not valid: failed to get redirect location." + return 1 + fi + + say_verbose "The redirect location retrieved: '$aka_ms_download_link'." + return 0 + else + say_verbose "The aka.ms link '$aka_ms_link' is not valid: received HTTP code: $(echo "$broken_redirects" | paste -sd "," -)." + return 1 + fi +} + calculate_vars() { eval $invocation valid_legacy_download_link=true + #normalize input variables normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" - say_verbose "normalized_architecture=$normalized_architecture" - + say_verbose "Normalized architecture: '$normalized_architecture'." normalized_os="$(get_normalized_os "$user_defined_os")" - say_verbose "normalized_os=$normalized_os" + say_verbose "Normalized OS: '$normalized_os'." + normalized_quality="$(get_normalized_quality "$quality")" + say_verbose "Normalized quality: '$normalized_quality'." + normalized_channel="$(get_normalized_channel "$channel")" + say_verbose "Normalized channel: '$normalized_channel'." + normalized_product="$(get_normalized_product "$runtime")" + say_verbose "Normalized product: '$normalized_product'." + + #try to get download location from aka.ms link + #not applicable when exact version is specified via command or json file + normalized_version="$(to_lowercase "$version")" + if [[ -z "$json_file" && "$normalized_version" == "latest" ]]; then + + valid_aka_ms_link=true; + get_download_link_from_aka_ms || valid_aka_ms_link=false + + if [ "$valid_aka_ms_link" == false ]; then + # if quality is specified - exit with error - there is no fallback approach + if [ ! -z "$normalized_quality" ]; then + say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'." + say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support." + return 1 + fi + say_verbose "Falling back to latest.version file approach." + else + say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'." + download_link=$aka_ms_download_link + + say_verbose "Downloading using legacy url will not be attempted." + valid_legacy_download_link=false + + #get version from the path + IFS='/' + read -ra pathElems <<< "$download_link" + count=${#pathElems[@]} + specific_version="${pathElems[count-2]}" + unset IFS; + say_verbose "Version: '$specific_version'." + + #Retrieve product specific version + specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")" + say_verbose "Product specific version: '$specific_product_version'." + + install_root="$(resolve_installation_path "$install_dir")" + say_verbose "InstallRoot: '$install_root'." + return + fi + fi specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version" "$json_file")" specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version")" @@ -1011,6 +1314,8 @@ feed_credential="" verbose=false runtime="" runtime_id="" +quality="" +internal=false override_non_versioned_files=true non_dynamic_parameters="" user_defined_os="" @@ -1027,6 +1332,14 @@ do shift version="$1" ;; + -q|--quality|-[Qq]uality) + shift + quality="$1" + ;; + --internal|-[Ii]nternal) + internal=true + non_dynamic_parameters+=" $name" + ;; -i|--install-dir|-[Ii]nstall[Dd]ir) shift install_dir="$1" @@ -1084,7 +1397,9 @@ do --feed-credential|-[Ff]eed[Cc]redential) shift feed_credential="$1" - non_dynamic_parameters+=" $name "\""$1"\""" + #feed_credential should start with "?", for it to be added to the end of the link. + #adding "?" at the beginning of the feed_credential if needed. + [[ -z "$(echo $feed_credential)" ]] || [[ $feed_credential == \?* ]] || feed_credential="?$feed_credential" ;; --runtime-id|-[Rr]untime[Ii]d) shift @@ -1116,15 +1431,26 @@ do echo " - LTS - most current supported release" echo " - 2-part version in a format A.B - represents a specific release" echo " examples: 2.0; 1.0" - echo " - Branch name" - echo " examples: release/2.0.0; Master" - echo " Note: The version parameter overrides the channel parameter." + echo " - 3-part version in a format A.B.Cxx - represents a specific SDK release" + echo " examples: 5.0.1xx, 5.0.2xx." + echo " Supported since 5.0 release" + echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used." echo " -v,--version Use specific VERSION, Defaults to \`$version\`." echo " -Version" echo " Possible values:" echo " - latest - most latest build on specific channel" echo " - 3-part version in a format A.B.C - represents specific version of build" echo " examples: 2.0.0-preview2-006120; 1.1.0" + echo " -q,--quality Download the latest build of specified quality in the channel." + echo " -Quality" + echo " The possible values are: daily, signed, validated, preview, GA." + echo " Works only in combination with channel. Not applicable for current and LTS channels and will be ignored if those channels are used." + echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported." + echo " Supported since 5.0 release." + echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used, and therefore overrides the quality." + echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter." + echo " --feed-credential Token to access Azure feed. Used as a query string to append to the Azure feed." + echo " -FeedCredential This parameter typically is not specified." echo " -i,--install-dir Install under specified location (see Install Location below)" echo " -InstallDir" echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." @@ -1145,7 +1471,6 @@ do echo " --verbose,-Verbose Display diagnostics information." echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user." echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user." - echo " --feed-credential,-FeedCredential Azure feed shared access token. This parameter typically is not specified." echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." echo " -SkipNonVersionedFiles" echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly." @@ -1186,23 +1511,44 @@ say "- The SDK needs to be installed without user interaction and without admin say "- The SDK installation doesn't need to persist across multiple CI runs." say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.\n" +if [ "$internal" = true ] && [ -z "$(echo $feed_credential)" ]; then + message="Provide credentials via --feed-credential parameter." + if [ "$dry_run" = true ]; then + say_warning "$message" + else + say_err "$message" + exit 1 + fi +fi + check_min_reqs calculate_vars script_name=$(basename "$0") if [ "$dry_run" = true ]; then say "Payload URLs:" - say "Primary named payload URL: $download_link" + say "Primary named payload URL: ${download_link}" if [ "$valid_legacy_download_link" = true ]; then - say "Legacy named payload URL: $legacy_download_link" + say "Legacy named payload URL: ${legacy_download_link}" fi repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\""" + + if [ ! -z "$normalized_quality" ]; then + repeatable_command+=" --quality "\""$normalized_quality"\""" + fi + if [[ "$runtime" == "dotnet" ]]; then repeatable_command+=" --runtime "\""dotnet"\""" elif [[ "$runtime" == "aspnetcore" ]]; then repeatable_command+=" --runtime "\""aspnetcore"\""" fi + repeatable_command+="$non_dynamic_parameters" + + if [ -n "$feed_credential" ]; then + repeatable_command+=" --feed-credential "\"""\""" + fi + say "Repeatable invocation: $repeatable_command" exit 0 fi @@ -1219,4 +1565,4 @@ fi say "Note that the script does not resolve dependencies during installation." say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section." -say "Installation finished successfully." +say "Installation finished successfully." \ No newline at end of file From dd9ada314c874bbf564fdcd07dadbfca3d0f23c6 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Tue, 22 Jun 2021 10:57:55 -0700 Subject: [PATCH 108/108] Update description for action Fixes #209 by adding a few more terms for search discoverability --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ab0fe9e..30b863f 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: 'Setup .NET Core SDK' -description: 'Set up a specific version of the .NET Core CLI in the PATH and set up authentication to a private NuGet repository' +description: 'Used to build and publish .NET source. Set up a specific version of the .NET Core CLI in the PATH and set up authentication to a private NuGet repository' author: 'GitHub' branding: icon: play