in tools/release/release-verify.py [0:0]
def get_configs() -> dict:
"""
Parse the input user arguments and return a dictionary of arguments.
"""
# Parse the input arguments to this script.
parser = argparse.ArgumentParser(description="Perform CSDK Release activities.")
parser.add_argument("-r", "--root", action="store", required=True, dest="root", help="CSDK repo root path.")
parser.add_argument(
"--github-access-token",
action="store",
required=False,
dest="github_access_token",
help="Github API developer access token.",
)
parser.add_argument(
"--jenkins-api-url", action="store", required=False, dest="jenkins_api_url", help="Jenkins CI API url."
)
parser.add_argument(
"--jenkins-username", action="store", required=False, dest="jenkins_username", help="Jenkins CI username."
)
parser.add_argument(
"--jenkins-password", action="store", required=False, dest="jenkins_password", help="Jenkins CI password."
)
parser.add_argument(
"--csdk-version", action="store", required=True, dest="csdk_version", help="CSDK version to be released."
)
parser.add_argument(
"--disable-jenkins-server-verify",
action="store_true",
required=False,
default=False,
dest="disable_jenkins_server_verify",
help="Disable server verification for the Jenkins API calls if your system doesn't have the certificate in its store.",
)
parser.add_argument(
"--disable-github-release-tag-verify",
action="store_true",
required=False,
default=False,
dest="disable_github_release_tag_verify",
help="Disable verifying that there are Github releases and tags named after the versions of the spoke repos.",
)
parser.add_argument(
"--disable-cbmc-checks-for",
action="append",
required=False,
default=[],
dest="libraries-to-disable-cbmc-checks",
type=str.lower,
help="Disable CBMC checks for libraries, in case it is not available.",
)
args, unknown = parser.parse_known_args()
csdk_root = os.path.abspath(args.root)
# For each of the available libraries in the current branch require a version argument.
for library_dir in CSDK_LIBRARY_DIRS:
libraries = os.listdir(os.path.join(csdk_root, library_dir))
for library in libraries:
parser.add_argument(
f"--{library.casefold()}-version",
action="store",
required=True,
dest=f"{library.casefold()}",
type=str.lower,
help=f"{library} library version.",
)
args = parser.parse_args()
configs = vars(args)
return (configs, csdk_root)