Rolls back the HTML-tool side of the Codeberg-as-canonical refactor (commits2dc9ad2,b28c4ae,bdac8dc) in favor of a simpler model: per-version HTML files committed under website/releases/ as immutable real files; partial-version pins (<tool>_v<X.Y>.html, <tool>_v<X>.html) and channel mirrors (<tool>_<channel>.html) are checked-in symlinks. Docker-tag pattern: :1.2.3 is pinned, :1.2 floats, :1 floats further, :stable floats furthest. URL scheme — every URL resolves to actual HTML via the symlink chain; no JS indirection, no manifest.json, no Caddy regex-rewrite: /releases/<tool>_v<X.Y.Z>.html exact version (real file) /releases/<tool>_v<X.Y>.html latest patch within X.Y.* (symlink) /releases/<tool>_v<X>.html latest within X.*.* (symlink) /releases/<tool>_stable.html current stable (symlink) /releases/<tool>_beta.html current beta (symlink to stable when no active beta; real file when beta is in flight) /releases/<tool>_alpha.html current alpha (similar — symlink to beta or stable when no active alpha) Cascade rule (in shared/build-lib.sh promote_release): --release [version] (stable cut) → write per-version file; refresh 5 symlinks (_v<X.Y>, _v<X>, _stable, _beta, _alpha) → new versioned file; tag <tool>-v<X.Y.Z>. --release beta → overwrite <tool>_beta.html with real bytes; cascade _alpha.html → _beta.html (symlink). No tag — channel URLs are stable URLs by design; counters defeat that. --release alpha → overwrite <tool>_alpha.html with real bytes. No tag, no other side-effects. Plain `sh tool/build.sh` → dist/ only. No website/releases/ side-effect, no commit. Code changes: - .gitignore — drop website/releases/*.html and website/releases/zddc-server-* exclusions; HTML tool files are tracked again. Replace the comment with the new model description. - shared/build-lib.sh — drop next_prerelease (no -alpha.N / -beta.N counter tags). Drop the Codeberg-upload path for HTML tools (no longer sourcing publish-codeberg-release.sh from build-lib). promote_release rewritten with two helpers: _promote_stable (per-version file + 5 symlinks + tag) and _promote_channel (overwrite mirror + cascade alpha→beta on beta cut). - zddc/release.sh — drop alpha/beta channel path entirely; binaries publish only on stable cuts. zddc-server's beta/alpha builds-from-source via the helm charts (next phase) — no binary distribution needed for those channels. - bootstrap/level2.html.tmpl — drop manifest.json fetch; resolve ?v= to a static URL via the symlink chain. New suffixFor() handles channel names, exact versions, and partial-version pins (?v=0.0, ?v=0). Same logic in level1.html.tmpl already works because the local-staging files (e.g. ../<tool>_v0.0.html) exist via the same symlink scheme. - build.sh build_releases_index — revert to filesystem scan of website/releases/ instead of Codeberg API call. Drop manifest.json generation. Per-tool sections list channel chips + per-version pin links; zddc-server section links to Codeberg release pages directly. - tests/build-label.spec.js — fix the channel-label regex to match the pre-release-semver format introduced in commit9459139("v0.0.3-alpha · ..."). Pre-existing test failure that wasn't caught at the time. Storage: - 30 new committed files under website/releases/ — 10 real (per-version) + 20 symlinks (5 tools × 4 partial/channel variants, plus alpha as a real file by default). - Initial state: stable v0.0.2 across all 5 tools; alpha/beta/v0.0/v0 symlinks all point at <tool>_v0.0.2.html. - manifest.json deleted (no longer needed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
2.6 KiB
HTML
56 lines
2.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Loading Transmittal…</title>
|
|
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCI+CiAgPHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiByeD0iMTIiIGZpbGw9IiMxZTNhNWYiLz4KICA8ZyBmaWxsPSIjZmZmIj4KICAgIDxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjciLz4KICAgIDxwb2x5Z29uIHBvaW50cz0iNDMsMjUgNTAsMjUgMjEsNDMgMTQsNDMiLz4KICAgIDxyZWN0IHg9IjE0IiB5PSI0MyIgd2lkdGg9IjM2IiBoZWlnaHQ9IjciLz4KICA8L2c+Cjwvc3ZnPgo=">
|
|
<style>html,body{margin:0;font:14px system-ui,sans-serif;color:#666;padding:1rem}</style>
|
|
</head>
|
|
<body>
|
|
Loading…
|
|
<script>
|
|
// Level-2 bootstrap. Fetches transmittal from zddc.varasys.io and
|
|
// document.write()s it in place. The default upstream is the
|
|
// stable channel; the URL parameter ?v= overrides it:
|
|
//
|
|
// ?v=stable | beta | alpha switch to that channel
|
|
// ?v=0.0.4 (or v0.0.4) pin to that exact stable version
|
|
// ?v=0.0 (or v0.0) pin to latest patch within 0.0.x (symlink)
|
|
// ?v=0 (or v0) pin to latest within 0.x (symlink)
|
|
// (none) use the stable default
|
|
//
|
|
// Resolution is purely static — every URL maps to a real file or a
|
|
// checked-in symlink under <upstream>/releases/. No manifest lookup,
|
|
// no JS indirection, no client-side version arithmetic.
|
|
(async function () {
|
|
const params = new URLSearchParams(location.search);
|
|
const v = params.get('v');
|
|
const tool = 'transmittal';
|
|
const defaultChannel = 'stable';
|
|
const channels = ['stable', 'beta', 'alpha'];
|
|
const base = 'https://zddc.varasys.io/releases/';
|
|
|
|
function suffixFor(value) {
|
|
if (!value) return '_' + defaultChannel;
|
|
if (channels.indexOf(value) >= 0) return '_' + value;
|
|
// Strip optional leading 'v', accept "0.0.4" / "0.0" / "0".
|
|
const ver = value.startsWith('v') ? value.slice(1) : value;
|
|
return '_v' + ver;
|
|
}
|
|
|
|
try {
|
|
const assetUrl = base + tool + suffixFor(v) + '.html';
|
|
const resp = await fetch(assetUrl, { cache: 'no-cache', credentials: 'omit' });
|
|
if (!resp.ok) throw new Error(resp.status + ' ' + resp.statusText);
|
|
const html = await resp.text();
|
|
document.open();
|
|
document.write(html);
|
|
document.close();
|
|
} catch (err) {
|
|
document.body.textContent = 'Failed to load ' + tool + ': ' + err.message;
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|