mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add argument to skip checking the changed docker/official tree
This commit is contained in:
parent
27b544e47e
commit
259baa1f49
@ -120,12 +120,21 @@ def parse_args() -> argparse.Namespace:
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="if set, the tags will be updated before run",
|
help="if set, the tags will be updated before run",
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
parser_ldf = subparsers.add_parser(
|
||||||
"generate-ldf",
|
"generate-ldf",
|
||||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||||
help="generate docker library definition file",
|
help="generate docker library definition file",
|
||||||
parents=[global_args],
|
parents=[global_args],
|
||||||
)
|
)
|
||||||
|
parser_ldf.add_argument("--check-changed", default=True, help=argparse.SUPPRESS)
|
||||||
|
parser_ldf.add_argument(
|
||||||
|
"--no-check-changed",
|
||||||
|
dest="check_changed",
|
||||||
|
action="store_false",
|
||||||
|
default=argparse.SUPPRESS,
|
||||||
|
help="if set, the directory `docker/official` won't be checked to be "
|
||||||
|
"uncommitted",
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
return args
|
return args
|
||||||
|
|
||||||
@ -336,7 +345,8 @@ def generate_ldf(args: argparse.Namespace) -> None:
|
|||||||
directory = Path(git_runner.cwd) / args.directory / args.image_type
|
directory = Path(git_runner.cwd) / args.directory / args.image_type
|
||||||
versions = sorted([get_version_from_string(d.name) for d in directory.iterdir()])
|
versions = sorted([get_version_from_string(d.name) for d in directory.iterdir()])
|
||||||
assert versions
|
assert versions
|
||||||
assert not path_is_changed(directory)
|
if args.check_changed:
|
||||||
|
assert not path_is_changed(directory)
|
||||||
git = Git(True)
|
git = Git(True)
|
||||||
lines = ldf_header(git, directory)
|
lines = ldf_header(git, directory)
|
||||||
tag_attrs = TagAttrs(versions[-1], {}, None)
|
tag_attrs = TagAttrs(versions[-1], {}, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user