chore: declare app updates in the platform lists of Edition and Kubus titles #137

Merged
midas merged 1 commit from chore/app-update-check-platform-titles into dev 2026-10-28 23:09:07 +01:00
Owner

The app update check's PR step inserted AppTarget(version = ...) into the title's Constants<Title>.kt. Edition and Kubus titles have no AppTargets there any more (they live in EDITION_TARGETS/KUBUS_TARGETS), so nothing changed and git commit failed with "nothing to commit".

declare_version in .forgejo/scripts/app-update-check.sh now handles three cases:

  1. The title lists the version in untestedVersions: the PR drops it, or drops the whole argument line when it was the only entry (branch app-update/<package>-<version>, as before).
  2. The version is new to the platform: the PR adds it to the *Title.kt list right after the experimental entry, and to the untestedVersions of every other title of that platform.
    • The titles that passed in the same run are grouped into one PR, on branch app-update/<edition|kubus>-<version>.
    • Separate PRs per title would each mark the other titles untested. Merging all of them would then leave every title untested, and git would not report a conflict.
    • A title that passes while that PR is open gets no second PR. Once the PR is merged, the title's untestedVersions names the version, so a later run gives it its own case-1 PR.
  3. Videoland: unchanged. The version is inserted into its own AppTargets.

Also:

  • A failed commit or push now puts the checkout back on a clean $BASE_BRANCH. Before, the edits stayed in the index and leaked into the next package's branch.
  • Only one-line untestedVersions = setOf(...) arguments are edited. Any other form fails that package with an error instead of guessing.
  • CRLF/LF line endings are preserved (Git Bash's gawk needs BINMODE=3).

Tested on a scratch clone, with the report step's API calls and push stubbed:

  • Dry run:
    • Kubus 9.23.0 for De Stentor + De Gelderlander gives one PR; the other 6 titles get it in untestedVersions, and De Gelderlander's set becomes ("9.23.0", "9.22.0") only when it did not pass.
    • Trouw 7.53.1 and De Gelderlander 9.22.0 drop the line.
    • Videoland 1.117.0 gets an AppTarget.
    • de Volkskrant 7.53.1 is reported as already declared.
  • Real mode: every branch gets the expected commit. After an induced commit failure the checkout ends clean.
  • Unit checks: removing one entry from a set of several, adding to an existing set, and refusing a multi-line set.

Not tested: a real run in CI. The PR API call needs jq, which Git Bash doesn't have.

🤖 Generated with Claude Code

The app update check's PR step inserted `AppTarget(version = ...)` into the title's `Constants<Title>.kt`. Edition and Kubus titles have no AppTargets there any more (they live in `EDITION_TARGETS`/`KUBUS_TARGETS`), so nothing changed and `git commit` failed with "nothing to commit". `declare_version` in `.forgejo/scripts/app-update-check.sh` now handles three cases: 1. **The title lists the version in `untestedVersions`**: the PR drops it, or drops the whole argument line when it was the only entry (branch `app-update/<package>-<version>`, as before). 2. **The version is new to the platform**: the PR adds it to the `*Title.kt` list right after the experimental entry, and to the `untestedVersions` of every other title of that platform. - The titles that passed in the same run are grouped into one PR, on branch `app-update/<edition|kubus>-<version>`. - Separate PRs per title would each mark the other titles untested. Merging all of them would then leave every title untested, and git would not report a conflict. - A title that passes while that PR is open gets no second PR. Once the PR is merged, the title's `untestedVersions` names the version, so a later run gives it its own case-1 PR. 3. **Videoland**: unchanged. The version is inserted into its own AppTargets. Also: - A failed commit or push now puts the checkout back on a clean `$BASE_BRANCH`. Before, the edits stayed in the index and leaked into the next package's branch. - Only one-line `untestedVersions = setOf(...)` arguments are edited. Any other form fails that package with an error instead of guessing. - CRLF/LF line endings are preserved (Git Bash's gawk needs `BINMODE=3`). **Tested** on a scratch clone, with the report step's API calls and push stubbed: - Dry run: - Kubus 9.23.0 for De Stentor + De Gelderlander gives one PR; the other 6 titles get it in `untestedVersions`, and De Gelderlander's set becomes `("9.23.0", "9.22.0")` only when it did not pass. - Trouw 7.53.1 and De Gelderlander 9.22.0 drop the line. - Videoland 1.117.0 gets an AppTarget. - de Volkskrant 7.53.1 is reported as already declared. - Real mode: every branch gets the expected commit. After an induced commit failure the checkout ends clean. - Unit checks: removing one entry from a set of several, adding to an existing set, and refusing a multi-line set. **Not tested:** a real run in CI. The PR API call needs `jq`, which Git Bash doesn't have. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chore: declare app updates in the platform lists of Edition and Kubus titles
All checks were successful
CI / Build (pull_request) Successful in 1m19s
CI / Patch check (pull_request) Successful in 32s
755834fc04
The update check's PR step inserted an AppTarget into the title's Constants<Title>.kt, which
has none since the tested versions moved to EDITION_TARGETS/KUBUS_TARGETS; the commit then
failed with "nothing to commit". declare_version now:

- drops the version from the title's untestedVersions when it is listed there;
- adds a version new to the platform to its *Title.kt list and to the untestedVersions of
  every title that did not pass in the same run, in one PR per platform and version
  (app-update/<platform>-<version>), so per-title PRs cannot each mark the others untested;
- keeps inserting into Videoland's own AppTargets.

A failed commit or push restores a clean checkout before the next package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.