Skip to content

Commit

Permalink
chore: read backend image tag from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Apr 11, 2024
1 parent 622f291 commit f9d956b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker/build.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Script for building and pushing the Boltz Docker images."""
import json
import sys
from argparse import ArgumentParser
from dataclasses import dataclass
Expand Down Expand Up @@ -95,7 +96,8 @@ class Image:
],
),
"boltz": Image(
tag="v3.3.0",
# Is read from the package.json file
tag="",
arguments=[
NODE_VERSION,
],
Expand Down Expand Up @@ -239,6 +241,11 @@ def parse_images(to_parse: list[str]) -> list[str]:


if __name__ == "__main__":
with Path.open(
Path(__file__).parent.parent.absolute().joinpath("package.json")
) as package_json:
IMAGES["boltz"].tag = json.load(package_json)["version"]

PARSER = ArgumentParser(description="Build or push Docker images")

# CLI commands
Expand Down

0 comments on commit f9d956b

Please sign in to comment.