Redirector for code forges that don't have stable URLs for release assets (by default).
$ SERVER=https://fdroid-release-redirector.herokuapp.com
$ NAMESPACE=some-user PROJECT=some-project RELEASE=v1.0
$ curl -sI $SERVER/gitlab/$NAMESPACE/$PROJECT/$RELEASE/release.apk | grep ^Location:
Location: https://example.com/some.apk
When using Binaries:
for F-Droid reproducible builds, you can use something
like this in the metadata/your.app.id.yml
:
Binaries: https://fdroid-release-redirector.herokuapp.com/gitlab/yourusername/yourapp/v%v/app-release.apk
NB: replace forge (gitlab
), username (yourusername
), repository (yourapp
),
tag format, and filename (app-release.apk
) with appropriate values.
NB: it turns out that Codeberg already has stable URLs, even though the download
page uses non-stable ones:
https://codeberg.org/<namespace>/<project>/releases/download/<tag>/<filename>
.
API: /codeberg/<namespace>/<project>/<release-tag>/<filename>
filename
must match the name
of one of the assets.
API: /gitlab/<namespace>/<project>/<release>/<filename>
filename
must match the filename of one of the asset links or a file upload in
the release description.
API: /notabug/<namespace>/<project>/<release>/<filename>
filename
must match the filename of one of the downloads.
NB: there does not seem to be a JSON API for releases like for the other forges, so the project's releases HTML page is scraped (which could break if the HTML changes); pagination is currently not supported (so the release is only found if it is on the first page).
- GitHub (no need, since release assets already have stable URLs)