-
Léo Banno-Cloutier authored
This adds a dev environment, which enables hot reloading on jams-react-client. Also, maven can now properly cache its dependencies, making recompilation faster Change-Id: If9561ccadc7c7c116446fd47f4b041cb371b9760
Léo Banno-Cloutier authoredThis adds a dev environment, which enables hot reloading on jams-react-client. Also, maven can now properly cache its dependencies, making recompilation faster Change-Id: If9561ccadc7c7c116446fd47f4b041cb371b9760
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
generate-versions.py 831 B
import hashlib
import json
import sys
from pathlib import Path
def read_versions(versions_file: Path) -> dict:
if not versions_file.exists():
return {}
with open(versions_file) as f:
return json.load(f)
def main() -> None:
here = Path(__file__).parent
versions_file = here / "versions.json"
class_name = sys.argv[1]
version = sys.argv[2]
filename = sys.argv[3]
versions = read_versions(versions_file)
md5_hash = hashlib.md5()
with open(here / "jams" / filename, "rb") as jar:
md5_hash.update(jar.read())
versions[class_name] = {
"version": version,
"filename": filename,
"md5": md5_hash.hexdigest(),
}
with open(versions_file, "w") as f:
json.dump(versions, f, indent=4)
if __name__ == "__main__":
main()