/ challenges-old / string-solutions
Sign in
challenges-old / string-solutions
Cache-busted player reference
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 3350e00e8b8d parent 107bcdd Browse files
1 changed file+4−1
web/build.pymodified+4−1View file
@@ -29,7 +29,10 @@ def main():
2929 sol["fields"]["path"] = f"{rel_dir.as_posix()}/{sol['fields']['path']}"
3030 entry["submissions"].append(sub)
3131 shutil.copytree(ROOT / "solutions", out / "solutions")
32- shutil.copyfile(ROOT / "web" / "index.html", out / "index.html")
32+ from challenge_tools.build import player_version
33+
34+ html = (ROOT / "web" / "index.html").read_text().replace('src="player.js"', f'src="player.js?v={player_version()}"')
35+ (out / "index.html").write_text(html)
3336 shutil.copyfile(ROOT / "web" / "viewer.js", out / "viewer.js")
3437 # the shared Web Audio player, from the installed challenge-tools package
3538 from challenge_tools.build import player_js
↑↓ move↵openescclose