Skip to content

Commit

Permalink
Simplify build_cmd construction
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Oct 21, 2024
1 parent 15f4e55 commit 87fe952
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions deploy/scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,25 +249,15 @@ def main() -> None:
container_cmd.append("--debug")
match container_cmd[0]:
case "nerdctl":
build_cmd = container_cmd + [
"-n",
args.namespace,
"build",
"--platform",
"linux/amd64,linux/arm64",
]
build_cmd = container_cmd + ["-n", args.namespace, "build"]
push_cmd = container_cmd + ["-n", args.namespace, "push"]
case "docker":
build_cmd = container_cmd + [
"buildx",
"build",
"--platform",
"linux/amd64,linux/arm64",
]
build_cmd = container_cmd + ["buildx", "build"]
push_cmd = container_cmd + ["push"]
case _:
logging.critical(f"Container CLI '{container_cmd[0]}' is not supported.")
sys.exit(1)
build_cmd.extend(["--platform", "linux/amd64,linux/arm64"])

# Setup build options
if args.quiet:
Expand Down

0 comments on commit 87fe952

Please sign in to comment.