Skip to content

Commit 5795f3e

Browse files
hack/build-image: add rebuild command
Add a --rebuild command to force building of images that already exist in local storage. Signed-off-by: John Mulligan <[email protected]>
1 parent e21702b commit 5795f3e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hack/build-image

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,10 @@ def build(cli, target, rebuild=False):
677677
fh.write(f"{cid} {target.image_name()}\n")
678678

679679

680+
def rebuild(cli, target):
681+
return build(cli, target, rebuild=True)
682+
683+
680684
class QMatcher:
681685
"""Push only tags that meet the specified criteria:
682686
all - all tags;
@@ -994,6 +998,13 @@ def main():
994998
" for a given FQIN. Requires FQIN to already exist locally."
995999
),
9961000
)
1001+
behaviors.add_argument(
1002+
"--rebuild",
1003+
action="store_const",
1004+
dest="main_action",
1005+
const=rebuild,
1006+
help="Always rebuild images even if matching images exist locally.",
1007+
)
9971008
behaviors.add_argument(
9981009
"--archive",
9991010
metavar="LOCATION",

0 commit comments

Comments
 (0)