Cache-busted player reference
1 changed file+4−1
web/build.pymodified+4−1View file
@@ -40,7 +40,10 @@ def main():
4040 sol["fields"]["available"] = local.exists() and not is_lfs_pointer(local)
4141 entry["submissions"].append(sub)
4242 shutil.copytree(ROOT / "solutions", out / "solutions")
43- shutil.copyfile(ROOT / "web" / "index.html", out / "index.html")
43+ from challenge_tools.build import player_version
44+
45+ html = (ROOT / "web" / "index.html").read_text().replace('src="player.js"', f'src="player.js?v={player_version()}"')
46+ (out / "index.html").write_text(html)
4447 shutil.copyfile(ROOT / "web" / "viewer.js", out / "viewer.js")
4548 # the shared Web Audio player, from the installed challenge-tools package
4649 from challenge_tools.build import player_js