Files
GDevelop-Heretek/scripts
John Smith 843e23e1ef fix(ci): pin fork-divergence guard to a baseline commit
The fork-divergence job has been red since upstream pushed on 2026-09-23:
191 modified paths vs 126 allowlisted, 65 "unexpected", plus one unexpected
upstreamMissing entry.

Root cause is not fork divergence. The guard compared the fork against the
live refs/remotes/upstream/master (or the API's master tip), so every
upstream push that touched a file the fork also carries read as newly
introduced divergence. All 66 reported paths were byte-identical to the
fork's previous upstream snapshot — the fork had never modified them. The
one upstreamMissing entry came from an upstream commit that touched it in
that same window.

Compare against a baseline commit instead:

  * fork-divergence.json records `baselineCommit` (here the merge base of
    the last upstream sync, b9109cfbaa). The reported set now only moves
    when the fork's own content moves, which is the only signal a reviewer
    can act on.
  * Resolution falls back to `git merge-base HEAD upstream/master` when the
    field is absent, and the baseline tree is read either from a local
    commit or the GitHub trees API by SHA — still no ~1.7 GB clone in CI.
  * A baseline that is recorded but unreachable is a hard error (exit 2)
    rather than a silent fallback to live upstream, which would reintroduce
    exactly the false positives the baseline exists to remove.

Re-anchoring also drops entries that have converged: 10 paths the fork once
modified but which now match the baseline (upstream fixes adopted by the
merge) are no longer divergence. Verified all 10 are byte-identical to the
baseline and none is touched by a non-merge fork commit, so nothing is lost.

Also updates MAINTENANCE.md, scripts/README.md, AGENTS.md, docs and the
ci.yml comment to the corrected semantics and counts (180 paths: 116/57/7).

Verified: guard exits 0 locally against upstream at a later HEAD; exits 0 in
a depth-1 clone with no upstream ref against the API-by-SHA path; still exits
1 on a new modification, a stale entry, and a restored upstreamMissing file;
exits 2 with an actionable message when no baseline can be resolved.
2026-09-23 11:42:24 -04:00
..

Scripts files for GDevelop

Repository-wide tooling. Per-package scripts live in each package's own package.json, not here.

Fork maintenance

See MAINTENANCE.md for how these fit together.

  • check-fork-divergence.js: keeps the fork's divergence from upstream 4ian/GDevelop bounded. Compares this tree against the baseline commit recorded in fork-divergence.json (falling back to git merge-base HEAD upstream/master) and checks the result against the checked-in allowlist; exits 1 on a path that diverges without being listed or a listed path that no longer diverges. Measuring against a fixed baseline rather than live upstream/master is what keeps upstream's own pushes from reading as fork divergence. --update rewrites the allowlist and records the baseline, --list prints the divergence set. Runs in ci.yml (fork-divergence job) and, informationally, in upstream-sync.yml.
  • sonarcloud-drift.js: compares the project's open SonarCloud issue count against .sonarcloud-drift-baseline and fails when growth exceeds the threshold. Self-seeds the baseline when it is missing and writes count / baseline / seeded to $GITHUB_OUTPUT. --update-baseline records the current count; --max-growth-pct=<n> overrides the 10% default. Runs weekly in .github/workflows/fallow.yml.
  • security/check-lockfiles.js: asserts no manifest in the repo pins a known-malicious or critically vulnerable version of the packages listed in the script. Runs in ci.yml (lockfile-guard job).

Documentation and translations

  • GenerateAllDocs.[bat|sh]: Calls doxygen to generate all documentation into docs folder.
  • ExtractTranslations.[bat|sh]: Creates the source.pot file containing the strings to be translated using Crowdin.

Upstream scripts removed in this fork

ReleaseProcedure.bat, ReleaseProcedure.sh and CopyWindowsToLinuxReleaseFiles.sh are referenced by older upstream docs but do not exist in this checkout — packaging happens through .github/workflows/build-release.yml and newIDE/electron-app. Do not add them back from an upstream sync.