diff options
Diffstat (limited to 'scripts/newos4-maintain.py')
| -rw-r--r-- | scripts/newos4-maintain.py | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/scripts/newos4-maintain.py b/scripts/newos4-maintain.py index c28fb8b..8cc7c5a 100644 --- a/scripts/newos4-maintain.py +++ b/scripts/newos4-maintain.py @@ -119,6 +119,33 @@ def check_course(): r = run([sys.executable, 'scripts/course-validate.py'], cwd=ROOT) add('PASS' if r.returncode == 0 else 'FAIL', 'course ' + ('valid' if r.returncode == 0 else 'INVALID: ' + r.stdout[-160:])) +def check_changelog(): + """The changelog page must describe the build that is actually running. + + docs/changelog.html was hand-built from VFS notes and had stopped at v4.6.101 while + the app was on v4.6.119 -- a docs page that lags the release is worse than no page, + because it reads as current. build-changelog.py derives every entry from git, so the + only thing left to check is whether it has been run since the last version bump. + """ + script = os.path.join(ROOT, 'scripts/build-changelog.py') + if not os.path.exists(script): + add('FAIL', 'changelog: scripts/build-changelog.py missing') + return + r = run([sys.executable, script, '--check'], cwd=ROOT) + if r.returncode == 0: + add('PASS', 'changelog: ' + (r.stdout.strip() or 'current')) + return + stale = (r.stdout or r.stderr).strip().splitlines() + stale = stale[-1][:150] if stale else 'stale' + if FIX: + r2 = run([sys.executable, script], cwd=ROOT) + if r2.returncode == 0: + add('PASS', 'changelog regenerated: ' + (r2.stdout.strip()[:130] or 'ok')) + return + add('FAIL', 'changelog regen failed: ' + (r2.stderr.strip()[:150] or '?')) + return + add('FAIL', 'changelog ' + stale) + def check_help_coverage(): """Every command the code registers must appear in help.html (2026-10-22). @@ -188,7 +215,7 @@ def check_links(): def main(): os.chdir(ROOT) bad = syntax_failures() # computed once, gates the bundle rebuild - check_versions(); check_syntax(bad); check_regression_tests(); check_bundles(bad); check_perms(); check_index(); check_data(); check_live(); check_atlas(); check_course(); check_help_coverage(); check_links() + check_versions(); check_syntax(bad); check_regression_tests(); check_bundles(bad); check_perms(); check_index(); check_data(); check_live(); check_atlas(); check_course(); check_help_coverage(); check_links(); check_changelog() fails = [m for l, m in issues if l == 'FAIL'] print('newOS4 maintenance — ' + datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%MZ') + (' [fix]' if FIX else '') + (' [deep]' if DEEP else '')) for l, m in issues: print(f'{l}: {m}') |