-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add a mariner install script #19294
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
Add a mariner install script #19294
Conversation
JamesWTruher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine - I've got questions, but everything looks fine.
| pool: ubuntu-latest | ||
| verification: | | ||
| if ([Version]"$($PSVersionTable.PSVersion.Major).$($PSVersionTable.PSVersion.Minor).$($PSVersionTable.PSVersion.Patch)" -lt [version]"6.2.0") | ||
| if ([Version]"$($PSVersionTable.PSVersion.Major).$($PSVersionTable.PSVersion.Minor).$($PSVersionTable.PSVersion.Patch)" -lt [version]"7.3.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be expressed as:
if([Version]$PSVersionTable.PSVersion -lt "7.3.0")
we did some stuff to enable converting a semanticversion into a version, but it's fine as is
| - template: templates/install-ps-phase.yml | ||
| parameters: | ||
| scriptName: sudo ./tools/install-powershell.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this - do we actually get the version from the current installed pwsh or the new one? and will this script be executable in the container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verification runs after we run the install script. It's possible it's the old pwsh, but the verification is only intended to catch issues that we have had in the past, which is mainly that the installation left the system in a bad state.
| OS=osx | ||
| DistroBasedOn=osx | ||
| else | ||
| OS=$(uname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we don't use the lowercase OS created in line 52, but ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is template code shared across many scripts. I only added code for mariner. I think we could redesign this, but I don't think it's needed.
| if [[ $osname = *SUSE* ]]; then | ||
| DistroBasedOn='suse' | ||
| fi | ||
| OS=$(lowercase "$OS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol - lowercase again
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
PR Summary
Add mariner support in the powershell installer script for Linux
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).