Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pyrex.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def build_image(config, build_config):

tag = config["config"]["tag"]

if config["config"]["buildlocal"] == "1":
if os.environ.get("PYREX_BUILD_LOCAL", config["config"]["buildlocal"]) == "1":
if VERSION_TAG_REGEX.match(tag.split(":")[-1]) is not None:
sys.stderr.write(
"Image tag '%s' will overwrite release image tag, which is not what you want\n"
Expand Down Expand Up @@ -406,9 +406,9 @@ def prep_container(
"WARNING: buildid for container image %s has changed\n" % runid
)

if config["config"]["buildlocal"] == "1" and build_config["build"][
"buildhash"
] != get_build_hash(config):
if os.environ.get(
"PYREX_BUILD_LOCAL", config["config"]["buildlocal"]
) == "1" and build_config["build"]["buildhash"] != get_build_hash(config):
sys.stderr.write(
"WARNING: The container image source has changed and should be rebuilt.\n"
"Try running: 'pyrex-rebuild'\n"
Expand Down