Skip to content

Conversation

@mthalman
Copy link
Member

@mthalman mthalman commented Dec 15, 2023

Contributes to dotnet/source-build#3743

@mthalman mthalman requested a review from a team as a code owner December 15, 2023 15:01
@mthalman
Copy link
Member Author

The tools.sh override is still needed since not all repos have an updated Arcade which allows it to the framework version to be overridden. That means the corresponding issue will remain open until repos have got the new Arcade.

# BuildXPlatTasks uses NetCurrent but that is not set since Arcade isn't used here.
# Bootstrap NetCurrent by deriving it from the installed .NET CLI version.
dotnetVersion=$(echo $("$CLI_ROOT/dotnet" --version) | sed -E 's/^([0-9]+\.[0-9]+)\..*/\1/')
netCurrent="net$dotnetVersion"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a bit light-weight variant:
netCurrent="$(dotnet --version | while IFS='.' read major minor _; do echo "net$major.$minor"; done)"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I like the readability of that.

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

Successfully merging this pull request may close these issues.

4 participants