-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Summary of the new feature / enhancement
Currently, there's no consistent URL for the latest/current version of the three major release types (Stable/LTS/Preview). This makes it remarkably difficult to build automated update mechanisms, since you have to create a custom URL for each platform and version (including the source tarballs/zips)
This forces manual downloads and as the downloads all have custom names with versions:
- PowerShell-7.5.4-win-x64.msi
- powershell-7.5.4-osx-arm64.pkg
etc., it's hard to automate post-download. This is basically a showstopper for an app idea i've been working on as it requires PowerShell (since it's an app to sign PowerShell scripts on macOS), which means I need a reliable way to automatically update the PowerShell implementation the app is using.
Proposed technical implementation details (optional)
Create a better structure for downloads that would allow for a consistent "latest/current" URL. For example, within https://github.com/PowerShell/PowerShell/releases, there can be three subdirectories:
- Stable
- LTS
- Preview
Then (optionally) within each of those, the three major platforms:
- Windows
- macOS
- Linux
Then within those, the "latest", so for Windows:
- PowerShell-Win-Latest-arm64.msi
- PowerShell-Win-Latest-arm64.zip
- PowerShell-Win-Latest-x64.msi
and so forth. The same for Linux and macOS releases. The important thing is that the name and the download URL never change.
Tracking a new release wouldn't have to change, a daily check for the existing JSON data is workable, i.e. https://aka.ms/pwsh-buildinfo-stable and parsing the JSON from that.
Obviously the better way for this would be something ala yum update, such as: get-psupdate -type Stable -Version latest, but the above suggestion is a good method until then, and could still exist for users who would rather not do a self update. The two versions are not mutually exclusive.