Skip to content

Need a consistent link to download latest/current stable/LTS/Preview builds for each platform #26423

@johncwelch

Description

@johncwelch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions