Is there a way to give users a link to the latest version of Windows Terminal msixbundle? Or even how to get the URL programmatically?
Like pseudo code:
location=curl -sI https://github.com/microsoft/terminal/releases/latest | grep location:
version := path.Base(location)
versionNoV := version[1:]
wtfisthis := "8wekyb3d8bbwe"
base_url = "https://github.com/microsoft/terminal/releases/download"
url = fmt.Sprintf("%s/%s/Microsoft.WindowsTerminal_%s_%s.msixbundle",
base_url, version, versionNoV, wtfisthis)
CodePudding user response:
GitHub doesn't provide an automatic link for the latest release that can be used to directly download a release asset. In general, you should be careful about trying to do this, since sometimes the latest release is a new major version, bringing in incompatible changes.
However, you can query the GitHub REST API to find assets related to the latest release. That will contain the proper URLs to use. However, it is not static.