fix wrong argument
parent
b14bab60f0
commit
0fbdcf1a66
|
|
@ -129,7 +129,7 @@ def args_setup(description):
|
|||
parser.add_argument("compose_files", nargs="+")
|
||||
parser.add_argument("--output", "-o")
|
||||
parser.add_argument("--ignore", "-i", nargs="+", default=False)
|
||||
parser.add_argument("--match-suffix", "-s", action="store_false")
|
||||
parser.add_argument("--match-suffix", "-s", action="store_true")
|
||||
return parser
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ def replace(string, replacements):
|
|||
|
||||
|
||||
def compare(base, other, match_suffix=False, replacements=[("-","+"),]):
|
||||
if match_suffix:
|
||||
if match_suffix and "-" in base:
|
||||
suffix = base.split("-")[-1]
|
||||
if not other.endswith(suffix):
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -31,16 +31,16 @@ def main(args):
|
|||
if not "base_images" in usage:
|
||||
continue
|
||||
for base in usage["base_images"]:
|
||||
info = [{
|
||||
info = {
|
||||
"is_base_image": True,
|
||||
"path": usage["path"],
|
||||
"service_name": usage["service_name"]
|
||||
}]
|
||||
}
|
||||
if base in updates:
|
||||
updates[base]["usages"].append(info)
|
||||
else:
|
||||
log.info(f"find base image updates for {base}")
|
||||
updates[base] = find_updates(base, info, args.match_suffix)
|
||||
updates[base] = find_updates(base, [info], args.match_suffix)
|
||||
|
||||
if args.output:
|
||||
with open(args.output, "w") as out:
|
||||
|
|
|
|||
Loading…
Reference in New Issue