Skip to content

Update install-powershell.ps1 with more options - #19884

Closed
Ryan Yates (kilasuit) wants to merge 14 commits into
PowerShell:masterfrom
kilasuit:update-install-powershell-script
Closed

Ryan Yates (kilasuit) wants to merge 14 commits into
PowerShell:masterfrom
kilasuit:update-install-powershell-script

Conversation

@kilasuit

@kilasuit Ryan Yates (kilasuit) commented Jul 2, 2023 •

Copy link
Copy Markdown
Collaborator

PR Summary

Adds additional parameters into the install-powershell.ps1 script for use with installing LTS or a specific version as passed through
Also updates the readme for this script.

Fixes #15403
Fixes #19883

PR Context

PR Checklist

@kilasuit

Copy link
Copy Markdown
Collaborator Author

Minor additional formatting changes were included whilst editing the script but does not impact use

Tested with the following which all work as expected

.\tools\install-powershell.ps1 -Destination C:\ps -Version '7.3.1' -Verbose

Unzips to C:\ps-7.3.1\ and informs the user on this

.\tools\install-powershell.ps1 -Version 'v7.3.1' -Verbose

Unzips to $env:LOCALAPPDATA\Microsoft\powershell-7.3.1\ and informs the user on this

.\tools\install-powershell.ps1 -Destination C:\ps -LTS -Verbose

Unzips to C:\ps-LTS\ and informs the user on this

@ghost ghost added the Review - Needed The PR is being reviewed label Jul 10, 2023
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@StevenBucher98 Steven Bucher (StevenBucher98) added the PowerShell-Docs not needed The PR was reviewed and doesn't appear to require a PowerShell Docs update label Jul 10, 2023
@daxian-dbw

Copy link
Copy Markdown
Member

Ryan Yates (@kilasuit) The "PowerShell-CI-install-ps" job failed, which is likely caused by the changes in this PR. Please take a look.

@ghost ghost removed the Review - Needed The PR is being reviewed label Jul 10, 2023
@daxian-dbw Dongbo Wang (daxian-dbw) added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 10, 2023
@kilasuit

Ryan Yates (kilasuit) commented Jul 10, 2023 •

Copy link
Copy Markdown
Collaborator Author

Dongbo Wang (@daxian-dbw) I have looked and can't see why my changes could cause the jobs to fail

(minor edit) Travis Plunk (@TravisEz13) or at least that I think I can fix as the error message is pointing to an issue as listed below (hope saves you from digging)

You have 45 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
First attempt of update failed. Increase Git buffer size and try again ...
error: Could not read ffac597fdb6ce8236b5e2da77ab6fbae3d9d9cb7
fatal: revision walk setup failed
error: https://github.com/Homebrew/homebrew-cask did not send all necessary objects

Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

ERROR: Refreshing Homebrew cache failed...
##[error]Bash exited with code '2'.

@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 10, 2023
Comment thread tools/install-powershell.ps1 Resolved
Comment thread tools/install-powershell.ps1 Resolved
Comment thread tools/install-powershell.ps1 Resolved
Comment thread tools/install-powershell.ps1 Resolved
Comment thread tools/install-powershell.ps1 Resolved
@daxian-dbw Dongbo Wang (daxian-dbw) added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 17, 2023
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 17, 2023
@kilasuit

Copy link
Copy Markdown
Collaborator Author

Currently working on this with updating the parameter sets properly - will push another update with this in the coming days

@kilasuit Ryan Yates (kilasuit) changed the title Added Version and LTS methods to the install script Update install-powershell.ps1 with more options Jul 28, 2023
@kilasuit
Ryan Yates (kilasuit) marked this pull request as draft July 28, 2023 20:00
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

2 similar comments
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@pull-request-quantifier-deprecated

Copy link
Copy Markdown

This PR has 165 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Medium
Size       : +137 -28
Percentile : 53%

Total files changed: 3

Change summary by file extension:
.yml : +65 -0
.ps1 : +60 -26
.md : +12 -2

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@daxian-dbw

Copy link
Copy Markdown
Member

Travis Plunk (@TravisEz13) Please review again when you get the time. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Review - Needed The PR is being reviewed label Aug 17, 2023
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Review - Needed The PR is being reviewed label Aug 24, 2023
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

1 similar comment
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@TravisEz13

Copy link
Copy Markdown
Member

/azp run PowerShell-CI-Windows

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Review - Needed The PR is being reviewed label Jan 17, 2025
@TravisEz13

Copy link
Copy Markdown
Member

/azp run PowerShell-CI-install-ps

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@TravisEz13

Copy link
Copy Markdown
Member

/azp run PowerShell-CI-install-ps

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@TravisEz13

Copy link
Copy Markdown
Member

/azp run PowerShell-CI-install-ps

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Mar 23, 2025 •

Copy link
Copy Markdown
Contributor

📣 Hey Ryan Yates (@kilasuit), how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@kilasuit

Ryan Yates (kilasuit) commented Mar 23, 2025 •

Copy link
Copy Markdown
Collaborator Author

I am abandoning this PR but am continuing with this work & will raise a fresh PR to review this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium PowerShell-Docs not needed The PR was reviewed and doesn't appear to require a PowerShell Docs update Review - Needed The PR is being reviewed

Projects

None yet

5 participants