Remove -Daily from install-powershell.ps1 since it no longer exists#25124
Conversation
|
Required for PowerShell/PowerShellEditorServices#2225. |
d214f23 to
31bb622
Compare
|
The bullet style was changed in order to satisfy the Markdown linter 🙃 |
|
Also required for PowerShell/PSScriptAnalyzer#2070. |
We have a request to have daily build #24566 In my understanding, daily builds are the only way for partner teams to continuously test their products. |
|
@andyleejordan should add a parameter alias to "Daily" to not break existing scripts. I'd say this merge as-is after that, but then a follow-on should replace daily with "CIBuild" or "GHBuild" to fetch the latest commit azdo build. @iSazonov per my comments on that, a "latest main commit build" is a better approach than a daily since tests are enforced for main commits. |
It depends on the needs of that project. If they want, they can track each pwsh PR and upload artifacts from it. |
Then they can still do that, and they'll get whatever the latest PR branch is available when they schedule their job to run on a daily basis. Solves both problems :) Dailies are an outdated development concept from the days where most work happened "during the day" and commit checks were rare. Since PowerShell has extensive gatekeeping on the main branch, pretty much every main commit can probably be considered to be fairly stable and unbroken at least for the vast majority of test cases, so it makes sense to provide an easy way to consume these artifacts that are already being built. |
Yeah, I'm wondering if the nicer thing to do is a) warn and just install the preview instead, or b) warn and exit with error. Right now it fails and that hasn't been breaking anyone so B is an option, but A is an option, though it's kind of a lie. |
9466126 to
66c870e
Compare
@TravisEz13 what would you prefer here and what do we want to communicate about the future of the daily build here? |
|
@TravisEz13 waiting on a decision from you / maintainers |
|
Also noting that we'll want to cleanup: |
Also install the Preview to `~/.powershell-preview` like the daily was.
66c870e to
edcd9d6
Compare
|
I never got an answer so I'm going with option A. |
|
@adityapatwardhan can you review this please? |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
There was a problem hiding this comment.
⚠️ Not ready to approve
The current parameter attribute changes allow unsupported flag combinations (eg -UseMSI -AddToPath) and the script help no longer documents the deprecated -Daily parameter.
Pull request overview
This PR updates tools/install-powershell.ps1 to retire the “daily build” install path/metadata flow, shifting to installing the latest Preview build (and updating documentation/examples accordingly).
Changes:
- Replaces the daily-build install path with Preview build selection based on
tools/metadata.json. - Adds a backward-compatibility
-Dailyswitch that maps to-Preview(with a warning). - Updates the companion README examples to use
-Previewinstead of-Daily.
File summaries
| File | Description |
|---|---|
| tools/install-powershell.ps1 | Switches “daily” behavior to Preview selection and updates default install destination suffix to -preview. |
| tools/install-powershell.ps1-README.md | Removes daily references and updates usage examples to -Preview. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 3
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
| [Parameter()] | ||
| [switch] $Daily, # Exists for backward compatibility | ||
|
|
||
| [Parameter(ParameterSetName = "Daily")] | ||
| [switch] $Daily, | ||
| [Parameter()] | ||
| [string] $Destination, |
| .Parameter Destination | ||
| The destination path to install PowerShell to. | ||
| .Parameter Daily | ||
| Install PowerShell from the daily build. | ||
| Note that the 'PackageManagement' module is required to install a daily package. | ||
| .Parameter Preview | ||
| Install the latest PowerShell preview build. |
| - Can be called directly from Git | ||
| - Optionally allows install of the latest Preview build | ||
| - Optionally installs using the latest MSI | ||
| - Automatically looks up latest version via Git tags |
PR Summary
This removes the
-Dailyflag from theinstall-powershell.ps1script as daily builds have not been posted in a year, and @adityapatwardhan says there are no current plans to resume doing so.Also updates the script to install the Preview to
~/.powershell-previewlike the daily was.PR Context
I use this for testing PowerShell Editor Services and PSScriptAnalyzer in CI against upcoming builds of PowerShell to find bugs before they make it to release.
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.- [ ] Issue filed:
(which runs in a different PS Host).