Opened 5 weeks ago

Last modified 5 weeks ago

#70055 new enhancement

Download links: Add computer friendly links

Reported by: bll123 (Brad Lanam) Owned by: admin@…
Priority: Normal Milestone:
Component: server/hosting Version:
Keywords: Cc:
Port:

Description

The download release files are currently named with the user-friendly names such as MacPorts-2.9.3-14-Sonoma.pkg.

For scripts that automate the download of MacPorts, this is a problem, as the MacOS version number must be mapped to the MacOS release name. e.g. I have in my shell script version checks such as:

  14*)
    mp_os_nm=Sonoma
    mp_os_vers=14
    ;;

And as far as I know, there's no easy way to get this name from the MacOS operating system.

The script will currently fail to download MacPorts for version 15 of MacOS (when it is released) unless I update it.

I don't know if the github releases supports symlinks, but it would be useful to have names that exclude the user-friendly portion so that scripts could locate the download file easier without having to update the script for every new release of MacOS.

Pros:

Good for automatic retrieval.

Cons:

Makes the list of releases much longer.

It is unknown how useful this is. Many downloads are done manually.

Alternatives:

A version to name text file could be made available in the releases download directory so that an automated script could look up the version names. This would be easy, but requires some maintenance for each release of MacOS.

Change History (4)

comment:1 in reply to:  description Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Keywords: github download removed

Related to #44700.

I've wanted this too as I recently worked on a script to automatically install the latest MacPorts version, but I was able to manage it without any changes to our infrastructure. The script needed to determine the current MacPorts version which it obtained from the last path component of the contents of https://raw.githubusercontent.com/macports/macports-base/master/config/RELEASE_URL, and then it needed to get the installer name (including the unpredictable macOS name) which it obtained from the contents of e.g. https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3.chk.txt; this is essentially the "version to name text file" you're asking for.

comment:2 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

I do not know if GitHub Releases support adding symlinks but I've never seen any project that does so so I assume it is not possible. You could try it out in your own repository and see if it works.

comment:3 Changed 5 weeks ago by jmroot (Joshua Root)

We could of course host redirects on our own site.

comment:4 Changed 5 weeks ago by bll123 (Brad Lanam)

Yes, I can use chk.txt. Rather messy, but it works.

Note: See TracTickets for help on using tickets.