Merge pull request 'fdroid-publish: comments follow versioned APK names' (#1) from fdroid-publish-versioned-docs into main

This commit was merged in pull request #1.
This commit is contained in:
SilverLABS committed 2026-10-05 09:54:19 +00:00
commit 4fca75393b
1 file changed
+6 -4
+6 -4
View File
@@ -6,7 +6,7 @@
# run from the app's own CI instead of a laptop:
# scp the APK to <repoRoot>/incoming on the repo host, run the host's
# /srv/fdroid/bin/ingest.sh (which verifies the signer cert against the pin,
# moves it to repo/<package>.apk and rebuilds the index under a lock), then read
# moves it to repo/<package>_<versionCode>.apk and rebuilds the index under a lock), then read
# the published index back — ingest returning 0 is not proof a client sees it.
#
# Inputs arrive as INPUT_* environment variables (see action.yml).
@@ -99,9 +99,11 @@ head_code() { # highest versionCode the channel serves for $pkg (0 if none)
before=$(head_code) || fail "could not read the $channel index at $url"
say "$channel serves $pkg versionCode $before; this APK is ${version_code:-unknown}"
# ingest.sh REPLACES repo/<package>.apk, so the channel only ever holds one APK
# per app. Publishing an older build over a newer one would roll the channel
# back — F-Droid never downgrades installed apps, so it would just go stale.
# ingest.sh publishes repo/<package>_<versionCode>.apk and keeps only the newest
# two builds per app (silverlined-deploy #51), so publishing an older build would
# at best be pruned straight away and at worst evict the previous build that
# clients still holding the old index are downloading. F-Droid never downgrades
# installed apps anyway.
if [ -n "$version_code" ] && [ "$version_code" -le "$before" ]; then
say "::notice::$pkg $version_code is not newer than what $channel already serves ($before) — nothing to publish"
exit 0