summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-09-21 19:22:54 +0000
committerClaude <noreply@anthropic.com>2026-09-21 19:22:54 +0000
commit35fd5e07e4a2554f62ed350b9d193a255901ce02 (patch)
tree40a36a4edacf705e98efe03bcb5db7fec9e2f7e3 /README.md
parent97e9b5e6f18705666b9d622b9eab0b31836321ba (diff)
publish-apk: cap the backups it creates
Four publishes in one evening left 448MB of .bak copies of a 112MB APK, in a public web directory. A backup policy with no retention becomes the problem it was guarding against. Keeps the two most recent, configurable with --keep. Prunes before copying, so a failed publish doesn't skip the pruning as well. The first version of the test gave all four fixture backups the same mtime, so 'ls -t' ordered them arbitrarily and 'keeps the most recent' proved nothing -- it only failed because the arbitrary order happened to go the wrong way. Worth recording: a test that passes for the wrong reason is the same class of problem as the dead code these guards exist to catch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index eff764a..6e8fc59 100644
--- a/README.md
+++ b/README.md
@@ -137,7 +137,9 @@ Publishes a built APK to the static site, checking each thing that has gone
wrong before: that this is the deploy host and not a box resembling it, that the
file is genuinely an APK rather than an HTML error page, that what landed is
byte-identical to what was tested, and that the web server serves those same
-bytes. Backs up any existing file first.
+bytes. Backs up any existing file first, keeping the two most recent (`--keep N`) — each backup is
+a full copy of a large APK in a public directory, and four publishes in one evening left
+448MB of them.
```
publish-apk app/build/outputs/apk/debug/app-debug.apk listen-debug.apk