dotnet / install-scripts

MIT License
127 stars 70 forks source link

Possibility to output installed version from the scripts #360

Closed IvanZosimov closed 1 year ago

IvanZosimov commented 1 year ago

Description: Is it possible after the run of install-script somehow output (e.g. set several environment variables) the resolved and installed version of the .NET SDK and runtime? It'd be very suitable for CI purposes.

For instance, after execution I'd like to be able to do this:

echo $Env:INSTALLED_DOTNET_SDK
echo $Env:INSTALLED_DOTNET_RUNTIME

If this feature is approved, I'd love to prepare pull request.

AR-May commented 1 year ago

Team Triage: This feature sounds reasonable. Different 'products' can be installed by the scripts, so the format of the generated environment variables should be something like: DOTNET_INSTALL_SCRIPTS_<PRODUCT>_LAST_INSTALLED_VERSION=<version>. Unfortunately, the project now is in the maintenance mode, and we do not have capacity for implementing this feature. However, we would be glad to accept such a feature if you would like to prepare a pull request.

IvanZosimov commented 1 year ago

Hi, @AR-May ! Thanks for the answer! Check the related PR https://github.com/dotnet/install-scripts/pull/361