Module continuous_delivery_scripts.sync_project_licence
Ensure the configured top-level licence file exists and matches project configuration.
Functions
def main() ‑> int-
Expand source code
def main() -> int: """Create a CLI for syncing the project's top-level licence file.""" parser = argparse.ArgumentParser( description=( "Create the configured project licence file when it is missing and check it matches " "the configured SPDX identifier." ) ) parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.") args = parser.parse_args() set_log_level(args.verbose) try: licence_file = sync_project_licence_file() if licence_file.exists(): print(f"Project licence file matches configured SPDX identifier: {licence_file}") return 0 except Exception as error: log_exception(logger, error) return 1Create a CLI for syncing the project's top-level licence file.