feat(build): symlink website/releases/<tool>_alpha.html into dist instead of copying
Every plain `sh tool/build.sh` invocation now reasserts a relative symlink website/releases/<tool>_alpha.html → ../../<tool>/dist/<tool>.html so the alpha hyperlinks always serve whatever dist currently holds. Idempotent — git sees no churn on rebuild. `--release alpha` still wins by overwriting the symlink with a real "alpha · <date> · <sha>" file; the next plain build re-symlinks it. Five existing alpha files become typechanges (regular file → symlink) — the one-time migration cost. The reassertion survives deployment because the website is served directly from the working tree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c2e8d364a9
commit
03f83ad211
15 changed files with 44 additions and 31862 deletions
|
|
@ -85,4 +85,6 @@ echo "Wrote $output_html"
|
|||
|
||||
if [ "$is_release" = "1" ]; then
|
||||
promote_release "archive"
|
||||
else
|
||||
update_alpha "archive"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -83,4 +83,6 @@ echo "Wrote $output_html"
|
|||
|
||||
if [ "$is_release" = "1" ]; then
|
||||
promote_release "classifier"
|
||||
else
|
||||
update_alpha "classifier"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -69,4 +69,6 @@ if [ "$is_release" = "1" ]; then
|
|||
# landing_stable.html at the customer deployment root, where the
|
||||
# project picker UI is useful (it queries zddc-server for the
|
||||
# project list). See AGENTS.md "Releasing — channels and layout".
|
||||
else
|
||||
update_alpha "landing"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -124,4 +124,6 @@ echo "Wrote $output_html ($(wc -c < "$output_html") bytes)"
|
|||
|
||||
if [ "$is_release" = "1" ]; then
|
||||
promote_release "mdedit"
|
||||
else
|
||||
update_alpha "mdedit"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -25,6 +25,18 @@
|
|||
# driven by $channel and $build_version. For
|
||||
# stable, also update the _stable.html
|
||||
# symlink and create the git tag.
|
||||
# update_alpha <tool> — (re)point website/releases/<tool>_alpha.html
|
||||
# as a relative symlink at the just-built dist
|
||||
# file, so the site's alpha hyperlinks always
|
||||
# serve whatever dist currently holds. Called
|
||||
# automatically by each tool's build.sh on
|
||||
# plain (non-release) builds. Idempotent —
|
||||
# reasserting the link on every build leaves
|
||||
# git clean. `--release alpha` still works:
|
||||
# promote_release replaces the symlink with a
|
||||
# real file labeled "alpha · <date> · <sha>"
|
||||
# (a deliberate snapshot that persists until
|
||||
# the next dev build re-symlinks).
|
||||
#
|
||||
# Channels and release args:
|
||||
# <none> dev build, dist/ only, label "Built: <ts> BETA" (red).
|
||||
|
|
@ -196,3 +208,20 @@ promote_release() {
|
|||
git -C "$root_dir" tag "${_tool}-v${build_version}"
|
||||
echo "Tagged ${_tool}-v${build_version} — run: git push --tags"
|
||||
}
|
||||
|
||||
# (Re)point website/releases/<tool>_alpha.html at the just-built dist file via
|
||||
# a relative symlink, so the website's alpha hyperlinks always serve whatever
|
||||
# dist currently holds. Called by each tool's build.sh whenever a release is
|
||||
# NOT being cut. Idempotent: if the link already points at the right target,
|
||||
# git sees no change. `--release alpha` overwrites this link with a real file
|
||||
# (with the "alpha · date · sha" label); the next plain build re-symlinks it.
|
||||
# Reads $output_html and $root_dir from caller scope.
|
||||
update_alpha() {
|
||||
_tool="$1"
|
||||
_releases_dir="$root_dir/../website/releases"
|
||||
_dist_basename=$(basename "$output_html")
|
||||
_target="../../${_tool}/dist/${_dist_basename}"
|
||||
mkdir -p "$_releases_dir"
|
||||
(cd "$_releases_dir" && ln -sfn "$_target" "${_tool}_alpha.html")
|
||||
echo "Linked ${_tool}_alpha.html -> $_target"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,4 +167,6 @@ echo "Wrote $output_html"
|
|||
|
||||
if [ "$is_release" = "1" ]; then
|
||||
promote_release "transmittal"
|
||||
else
|
||||
update_alpha "transmittal"
|
||||
fi
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because it is too large
Load diff
1
website/releases/archive_alpha.html
Symbolic link
1
website/releases/archive_alpha.html
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../archive/dist/archive.html
|
||||
File diff suppressed because it is too large
Load diff
1
website/releases/classifier_alpha.html
Symbolic link
1
website/releases/classifier_alpha.html
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../classifier/dist/classifier.html
|
||||
File diff suppressed because it is too large
Load diff
1
website/releases/landing_alpha.html
Symbolic link
1
website/releases/landing_alpha.html
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../landing/dist/index.html
|
||||
File diff suppressed because one or more lines are too long
1
website/releases/mdedit_alpha.html
Symbolic link
1
website/releases/mdedit_alpha.html
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../mdedit/dist/mdedit.html
|
||||
File diff suppressed because it is too large
Load diff
1
website/releases/transmittal_alpha.html
Symbolic link
1
website/releases/transmittal_alpha.html
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../transmittal/dist/transmittal.html
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue