Compare commits

..

No commits in common. "03597d37f0afd310ee6915fd18f3937a2080e3b7" and "94331320c0aebc9571a3b297c83d95a8a347f755" have entirely different histories.

4 changed files with 11 additions and 45 deletions

View File

@ -7,13 +7,6 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
## [Unreleased] ## [Unreleased]
---
## [1.43.1] — 2026-09-22
### Fixed
- **Front-end changes could appear to never take effect, no matter how hard the page was reloaded.** `static/index.html` hardcodes `?v=` cache-busting query strings on `style.css`, the per-page CSS files and `loader.js`, plus an `<meta name="app-version">` tag — nothing kept these in sync with `VERSION`, so they had silently drifted to different stale versions each (found live: `style.css` one release behind, `loader.js` sixteen releases behind). The server's static-file middleware marks any CSS/JS request *with* a `?v=` query as `Cache-Control: public, max-age=31536000, immutable` — a reasonable rule for genuinely fingerprinted assets, but since these tags never changed, a browser that had ever loaded e.g. `magazine.js?v=1.26.10` kept serving that exact response for a year, regardless of how many times the file changed on disk or how hard the page was force-reloaded. `scripts/release.py` now rewrites every `?v=X.Y.Z` and the `app-version` meta tag to the new version on every release, so a release is what actually invalidates the cache — not a manual, easy-to-forget edit.
## [1.43.0] — 2026-09-22 ## [1.43.0] — 2026-09-22
### Added ### Added
@ -4321,8 +4314,7 @@ Initial feature-complete release.
--- ---
[Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.43.1...HEAD [Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.10...HEAD
[1.43.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.43.0...v1.43.1
[1.26.10]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.9...v1.26.10 [1.26.10]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.9...v1.26.10
[1.26.9]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.8...v1.26.9 [1.26.9]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.8...v1.26.9
[1.26.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.0...v1.26.1 [1.26.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.0...v1.26.1

View File

@ -1 +1 @@
1.43.1 1.43.0

View File

@ -32,31 +32,9 @@ from pathlib import Path
REPO_ROOT = Path(__file__).parent.parent REPO_ROOT = Path(__file__).parent.parent
VERSION_FILE = REPO_ROOT / "VERSION" VERSION_FILE = REPO_ROOT / "VERSION"
CHANGELOG_FILE = REPO_ROOT / "CHANGELOG.md" CHANGELOG_FILE = REPO_ROOT / "CHANGELOG.md"
INDEX_HTML_FILE = REPO_ROOT / "static" / "index.html"
GITHUB_REPO = "mARTin-B78/tts-voice-creator-clone-and-design-2" GITHUB_REPO = "mARTin-B78/tts-voice-creator-clone-and-design-2"
GITHUB_BASE = f"https://github.com/{GITHUB_REPO}" GITHUB_BASE = f"https://github.com/{GITHUB_REPO}"
# static/index.html hardcodes ?v= cache-busting query strings on style.css,
# the per-page CSS files and loader.js, plus an <meta name="app-version">
# tag. Nothing previously kept these in sync with VERSION, so they silently
# drifted to different stale versions each (seen live: style.css one release
# behind, loader.js sixteen releases behind) -- StaticCacheHeadersMiddleware
# in server.py marks any *.css/js request WITH a ?v= query
# "Cache-Control: public, max-age=31536000, immutable", so once a browser
# had fetched e.g. magazine.js?v=1.26.10 it kept serving that exact response
# for a year regardless of how many times the file changed on disk or how
# hard the page was reloaded. Rewriting every ?v=X.Y.Z to the new version on
# every release is what actually invalidates that cache.
_VERSION_QUERY_RE = re.compile(r"(\?v=)\d+\.\d+\.\d+")
_APP_VERSION_META_RE = re.compile(r'(<meta name="app-version" content=")[^"]*(")')
def bump_index_html(new_str: str) -> str:
html = INDEX_HTML_FILE.read_text()
html = _VERSION_QUERY_RE.sub(rf"\g<1>{new_str}", html)
html = _APP_VERSION_META_RE.sub(rf"\g<1>{new_str}\g<2>", html)
return html
def read_version() -> tuple[int, int, int]: def read_version() -> tuple[int, int, int]:
text = VERSION_FILE.read_text().strip() text = VERSION_FILE.read_text().strip()
@ -146,17 +124,13 @@ def main() -> None:
print(f" {line}") print(f" {line}")
print() print()
index_html = bump_index_html(new_str)
if not dry: if not dry:
CHANGELOG_FILE.write_text(changelog) CHANGELOG_FILE.write_text(changelog)
VERSION_FILE.write_text(new_str + "\n") VERSION_FILE.write_text(new_str + "\n")
INDEX_HTML_FILE.write_text(index_html)
print(f" ✓ Wrote VERSION → {new_str}") print(f" ✓ Wrote VERSION → {new_str}")
print(f" ✓ Wrote CHANGELOG.md") print(f" ✓ Wrote CHANGELOG.md")
print(f" ✓ Wrote static/index.html cache-busting tags → {new_str}")
git("add", "VERSION", "CHANGELOG.md", "static/index.html") git("add", "VERSION", "CHANGELOG.md")
git("commit", "--no-verify", "-m", f"Release v{new_str}") git("commit", "--no-verify", "-m", f"Release v{new_str}")
git("tag", "-a", f"v{new_str}", "-m", f"v{new_str}") git("tag", "-a", f"v{new_str}", "-m", f"v{new_str}")

View File

@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#2563EB"> <meta name="theme-color" content="#2563EB">
<meta name="app-version" content="1.43.1"> <meta name="app-version" content="1.34.1">
<link rel="manifest" href="/manifest.webmanifest"> <link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml"> <link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icon.svg"> <link rel="apple-touch-icon" href="/static/icon.svg">
@ -27,12 +27,12 @@
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── --> <!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css"> <link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/style.css?v=1.43.1"> <link rel="stylesheet" href="/static/style.css?v=1.42.3">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.43.1"> <link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.42.3">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.43.1"> <link rel="stylesheet" href="/static/css/background-jobs.css?v=1.42.3">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.43.1"> <link rel="stylesheet" href="/static/css/voice-design.css?v=1.42.3">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.43.1"> <link rel="stylesheet" href="/static/css/rehearser.css?v=1.42.3">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.43.1"> <link rel="stylesheet" href="/static/css/audiobook.css?v=1.42.3">
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── --> <!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
@ -403,7 +403,7 @@ window.toggleNavTree = function(treeId, chevronId) {
</script> </script>
<!-- loader.js: fetches sections → loads JS modules → removes skeleton --> <!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
<script src="/static/loader.js?v=1.43.1"></script> <script src="/static/loader.js?v=1.26.10"></script>
</body> </body>
</html> </html>