Compare commits
16 commits
197e0ab19a
...
261c25c87f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
261c25c87f | ||
|
|
7397cddb83 | ||
|
|
da6f384399 | ||
|
|
52e5c1d328 | ||
|
|
27c7f4e37e | ||
|
|
31af42538a | ||
|
|
a4ec0305bc | ||
|
|
10d445c712 | ||
|
|
5677318ae2 | ||
|
|
ee82ef9b6e | ||
|
|
ebecb26c7c | ||
|
|
467092db1f | ||
|
|
c1fefcc766 | ||
|
|
c406352e1a | ||
|
|
ef0ff7f60d | ||
|
|
2b9f6c6b83 |
3 changed files with 3 additions and 32 deletions
|
|
@ -63,7 +63,7 @@ Per branch in JSON / sticky bar:
|
||||||
| `vs_parent_plus` / `vs_parent_minus` | `git diff --numstat` tip vs **parent** tip (sticky bar +grün/−rot; omitted when `parent` is empty or not in the tree, e.g. `main` and `feature/nl-net-injestion-injestor-update`) |
|
| `vs_parent_plus` / `vs_parent_minus` | `git diff --numstat` tip vs **parent** tip (sticky bar +grün/−rot; omitted when `parent` is empty or not in the tree, e.g. `main` and `feature/nl-net-injestion-injestor-update`) |
|
||||||
| `loc` | text-file line count of the tip vs the empty tree (gray `N LOC` in the plus/minus columns; only when there is no parent) |
|
| `loc` | text-file line count of the tip vs the empty tree (gray `N LOC` in the plus/minus columns; only when there is no parent) |
|
||||||
|
|
||||||
Rebuild runs **only when** the current origin tip is not already a successful freeze (`freeze_ok`; timer never forces). Cookie alias `editions/flask` copies from `DEFAULT_BRANCH` unless that alias is already `freeze_ok` for the same tip **and** `.edition-built-at` matches the source freeze.
|
Rebuild runs **only when** the current origin tip is not already a successful freeze (`freeze_ok`; timer never forces).
|
||||||
Each run also: `git fetch --prune`, `worktree prune`, drop stale
|
Each run also: `git fetch --prune`, `worktree prune`, drop stale
|
||||||
`editions/<slug>/` (gone remotes), purge leftover `tdpd-*` tmp dirs.
|
`editions/<slug>/` (gone remotes), purge leftover `tdpd-*` tmp dirs.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -534,26 +534,15 @@ def rebuild_edition(repo: Path, branch: str, tip: str, editions: Path) -> dict:
|
||||||
shutil.rmtree(wt, ignore_errors=True)
|
shutil.rmtree(wt, ignore_errors=True)
|
||||||
|
|
||||||
|
|
||||||
def _edition_built_at(editions: Path, slug: str) -> str:
|
|
||||||
p = editions / slug / ".edition-built-at"
|
|
||||||
if not p.is_file():
|
|
||||||
return ""
|
|
||||||
return p.read_text(encoding="utf-8").strip()
|
|
||||||
|
|
||||||
|
|
||||||
def sync_flask_alias(editions: Path, tips: dict[str, str]) -> None:
|
def sync_flask_alias(editions: Path, tips: dict[str, str]) -> None:
|
||||||
"""Keep editions/flask in sync with DEFAULT_BRANCH freeze when present."""
|
"""Keep editions/flask in sync with DEFAULT_BRANCH freeze when present."""
|
||||||
src_branch = default_branch()
|
src_branch = default_branch()
|
||||||
if src_branch not in tips:
|
if src_branch not in tips:
|
||||||
return
|
return
|
||||||
src_slug = edition_slug(src_branch)
|
src = editions / edition_slug(src_branch)
|
||||||
src = editions / src_slug
|
|
||||||
dst = editions / "flask"
|
dst = editions / "flask"
|
||||||
tip = tips[src_branch]
|
tip = tips[src_branch]
|
||||||
flask_ok, _ = freeze_ok_for(editions, "flask", tip)
|
if tip_recorded(editions, "flask") == tip and (dst / "index.html").is_file():
|
||||||
src_built = _edition_built_at(editions, src_slug)
|
|
||||||
flask_built = _edition_built_at(editions, "flask")
|
|
||||||
if flask_ok and src_built and src_built == flask_built:
|
|
||||||
return
|
return
|
||||||
if not (src / "index.html").is_file():
|
if not (src / "index.html").is_file():
|
||||||
ensure_placeholder(editions, "flask", tip)
|
ensure_placeholder(editions, "flask", tip)
|
||||||
|
|
|
||||||
|
|
@ -100,24 +100,6 @@ PY
|
||||||
printf '1\n' > "$EDITIONS/feat-a/.edition-freeze-ok"
|
printf '1\n' > "$EDITIONS/feat-a/.edition-freeze-ok"
|
||||||
rm -f "$EDITIONS/feat-a/.edition-freeze-error"
|
rm -f "$EDITIONS/feat-a/.edition-freeze-error"
|
||||||
|
|
||||||
# flask alias: matching tip + stale HTML must copy from DEFAULT_BRANCH
|
|
||||||
MAIN_TIP="$(tr -d '\n' < "$EDITIONS/main/.edition-tip")"
|
|
||||||
mkdir -p "$EDITIONS/flask"
|
|
||||||
printf '%s\n' "$MAIN_TIP" > "$EDITIONS/flask/.edition-tip"
|
|
||||||
printf '%s\n' '<html>stale-flask</html>' > "$EDITIONS/flask/index.html"
|
|
||||||
printf '%s\n' '2026-09-30T17:35:26+02:00' > "$EDITIONS/flask/.edition-built-at"
|
|
||||||
FETCH=0 TDPD_ROOT="$CLONE" OUT="$OUT" EDITIONS_ROOT="$EDITIONS" \
|
|
||||||
FREEZE_CMD="$FREEZE_CMD" REBUILD=1 DEFAULT_BRANCH=main \
|
|
||||||
python3 "$SCRIPT" --rebuild --no-fetch
|
|
||||||
grep -q "main" "$EDITIONS/flask/index.html"
|
|
||||||
if grep -q "stale-flask" "$EDITIONS/flask/index.html"; then
|
|
||||||
echo "FAIL flask alias kept stale HTML"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
test "$(tr -d '\n' < "$EDITIONS/flask/.edition-freeze-ok")" = "1"
|
|
||||||
test "$(tr -d '\n' < "$EDITIONS/flask/.edition-built-at")" = "$(tr -d '\n' < "$EDITIONS/main/.edition-built-at")"
|
|
||||||
echo "OK flask alias copied after stale skip"
|
|
||||||
|
|
||||||
# delete smoke branch on origin; fetch --prune drops remote-tracking ref
|
# delete smoke branch on origin; fetch --prune drops remote-tracking ref
|
||||||
cd "$CLONE"
|
cd "$CLONE"
|
||||||
git push origin --delete smoke/temp-sibling >/dev/null 2>&1
|
git push origin --delete smoke/temp-sibling >/dev/null 2>&1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue