This commit is contained in:
Vladimir Safonkin 2021-05-25 15:14:29 +03:00
parent 5fdcc8d864
commit 0f1221c462

View File

@ -11,7 +11,7 @@ The behavior is different for macOS runners because pre-installation directory m
- .NET supports installing and using multiple versions of .NET SDK and .NET runtime sidy-by-side and .NET CLI will use the latest of installed .NET SDK and .NET runtime version, this behavior is defined by .NET design (https://docs.microsoft.com/en-us/dotnet/core/versions/selection). The common practice is specifying required versions in project file. From other side, the presence of pre-installed .NET versions that are higher than version that the customers specify in the setup task can be breaking for some customers, who expect only one installed .NET version on runner after using setup task, so we should release new task version for consistent behavior on all runners and avoid breaking changes. - .NET supports installing and using multiple versions of .NET SDK and .NET runtime sidy-by-side and .NET CLI will use the latest of installed .NET SDK and .NET runtime version, this behavior is defined by .NET design (https://docs.microsoft.com/en-us/dotnet/core/versions/selection). The common practice is specifying required versions in project file. From other side, the presence of pre-installed .NET versions that are higher than version that the customers specify in the setup task can be breaking for some customers, who expect only one installed .NET version on runner after using setup task, so we should release new task version for consistent behavior on all runners and avoid breaking changes.
- The action contains logic to handle inputs with wildcards, for example `5.0.x`, `5.0.*`, `5.x` or `5.*`. This logic uses metadata from 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json' to retrieve list of available releases and get the latest release version for the specified major and/or minor version from input. After that, installer script (`dotnet-install.ps1` for Windows or `dotnet-install.sh` for Linux and MacOS) installs required SDK using exact version as parameter. We can get rid of this unnecessary logic in action since installer scripts have similar logic to find the latest release if the script is invoked with `channel` option. Example: the execution `dotnet-install.ps1 -Channel 5.0` installs the latest patch version for 5.0 sdk. In this way we can handle inputs with wildcard as patch version (`5.0.x` or `5.0.*`) by passing major and minor version to installer script directly as `channel` parameter. The inputs with wildcard as minor version (`5.x`) should be unsupported in V2 version of the action. - The action contains logic to handle inputs with wildcards, for example `5.0.x`, `5.0.*`, `5.x` or `5.*`. This logic uses metadata from `https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json` to retrieve list of available releases and get the latest release version for the specified major and/or minor version from input. After that, installer script (`dotnet-install.ps1` for Windows or `dotnet-install.sh` for Linux and MacOS) installs required SDK using exact version as parameter. We can get rid of this unnecessary logic in action since installer scripts have similar logic to find the latest release if the script is invoked with `channel` option. Example: the execution `dotnet-install.ps1 -Channel 5.0` installs the latest patch version for 5.0 sdk. In this way we can handle inputs with wildcard as patch version (`5.0.x` or `5.0.*`) by passing major and minor version to installer script directly as `channel` parameter. This parameter supports two-part version in X.Y format as input values ([see installer scripts documentation](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script)). The inputs with wildcard as minor version (`5.x`) should be unsupported in V2 version of the action.
# Proposal # Proposal
- Change .NET installation path for Windows and Ubuntu images to match the location of pre-installed versions by using `-InstallDir` (Windows) and `--install-dir` (Ubuntu) property for installer scripts: - Change .NET installation path for Windows and Ubuntu images to match the location of pre-installed versions by using `-InstallDir` (Windows) and `--install-dir` (Ubuntu) property for installer scripts: