Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-install should be able to get version from repository's global.json #10417

Closed
jeffkl opened this issue Aug 8, 2019 · 5 comments
Closed
Assignees
Milestone

Comments

@jeffkl
Copy link
Contributor

jeffkl commented Aug 8, 2019

Many users lock down their version of .NET Core via global.json. They also have scripts that prepare for build which installs the corresponding .NET Core. However, the version has to be defined in two places or every script must get the version from global.json and pass it to the dotnet-install script.

I'd like to add a feature to dotnet-install.ps1 to allow users to pass in a path to a global.json which will be read and that exact version will be installed. I'm not sure how to parse JSON in bash but I can try to update dotnet-install.sh as well.

@johnbeisner
Copy link
Contributor

@jeffkl
You say: "every script must get the version" You should be able to consolidate the harvesting of the version to at most 2 scripts. Arcade does it in this manner: https://github.com/dotnet/arcade/blob/638da455bb57ee432f733f71c08c6d1767ac798b/eng/common/tools.ps1#L128

@jeffkl
Copy link
Contributor Author

jeffkl commented Aug 8, 2019

I'm asking to have our scripts that call dotnet-install.ps1 to just pass the path to global.json rather than having to parse by itself. Not everyone is on Arcade so we have lots of repos with their own scripts that aren't updated or shared by some outside service.

@chrispat
Copy link

chrispat commented Sep 5, 2019

As mentioned in the issue referenced for github/actions we have been looking to implement this feature in our setup-dotnet action. My preference would be to have the installer scripts just handle it so people just get this for free.

@johnbeisner johnbeisner self-assigned this Sep 11, 2019
@johnbeisner
Copy link
Contributor

Deployment to 'staging': https://github.com/dotnet/dotnet-core-website/pull/1556

@jeffkl
Copy link
Contributor Author

jeffkl commented Oct 1, 2019

Thanks again @johnbeisner!

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the Discussion milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants