Skip to content

Conversation

@MattGal
Copy link
Member

@MattGal MattGal commented Aug 27, 2020

This stems from the changes (which will be rolled back if and when this change becomes available in the "normal" scripts) done as part of dotnet/arcade#6051.

The changes in this PR are a copy of the scripts added in https://github.com/dotnet/arcade/tree/master/eng/common/dotnet-install-scripts . I've simply made it such that the scripts will look for the existence of productVersion.txt, and if found use this instead of the "specificVersion" variable to resolve the path to the package(s) being downloaded and unzipped.

@bekir-ozturk
Copy link
Contributor

Relates to #65

@bekir-ozturk
Copy link
Contributor

@nohwnd Could you review this?

@MattGal MattGal force-pushed the product-version-prototyping branch from 339ed13 to 5aea6ec Compare September 2, 2020 16:57
@MattGal MattGal marked this pull request as ready for review September 2, 2020 17:00
@MattGal MattGal changed the title [DRAFT] - Changes to understand productVersion.txt if found in container with a build Changes to understand productVersion.txt if found in container with a build Sep 2, 2020
@bekir-ozturk bekir-ozturk requested review from a team and nohwnd September 2, 2020 17:05
$ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt"
}
else {
throw "Invalid value specified for `$Runtime"
Copy link
Contributor

Choose a reason for hiding this comment

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

is the ` preceeding $Runtime there by design?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw "Invalid value specified for `$Runtime"
throw "Invalid value '$Runtime' specified for `$Runtime."

$productVersion = $SpecificVersion
}
} catch {
Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion"
Copy link
Contributor

Choose a reason for hiding this comment

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

consider including $_.Exception.Message in the string passed to Say-verbose

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do; since the existing catches didn't I was trying to follow the pattern.

$ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt"
}
else {
throw "Invalid value specified for `$Runtime"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw "Invalid value specified for `$Runtime"
throw "Invalid value '$Runtime' specified for `$Runtime."

@MattGal
Copy link
Member Author

MattGal commented Sep 23, 2020

@donJoseLuis / @bozturkMSFT I think I've addressed the requests, could you look again?

Copy link
Contributor

@donJoseLuis donJoseLuis left a comment

Choose a reason for hiding this comment

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

difficult to sign off from a code review alone. Are there any tests? And if so, please call out if these didn't pass after these changes in your branch.

@MattGal
Copy link
Member Author

MattGal commented Oct 7, 2020

difficult to sign off from a code review alone. Are there any tests? And if so, please call out if these didn't pass after these changes in your branch.

This repo doesn't seem to have tests, no... but the scripts (from before some PR feedback) are in use in https://github.com/dotnet/arcade/tree/master/eng/common/dotnet-install-scripts in most .NET Core repos today.

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.

Install script fails trying to download release/5.0.1xx

4 participants