diff --git a/run_release.py b/run_release.py index 1267a5b..734933a 100755 --- a/run_release.py +++ b/run_release.py @@ -1239,11 +1239,6 @@ def _api_key(api_key: str) -> str: help="Username to be used when authenticating via ssh", type=str, ) - parser.add_argument( - "--no-gpg", - action="store_true", - help="Skip GPG signing", - ) args = parser.parse_args() auth_key = args.auth_key or os.getenv("AUTH_INFO") @@ -1264,7 +1259,8 @@ def _api_key(api_key: str) -> str: "This release script is not compatible with the running platform" ) - no_gpg = args.no_gpg + release_tag = release_mod.Tag(args.release) + no_gpg = release_tag.as_tuple() >= (3, 14) # see PEP 761 tasks = [ Task(check_git, "Checking Git is available"), Task(check_make, "Checking make is available"), @@ -1329,10 +1325,10 @@ def _api_key(api_key: str) -> str: ] automata = ReleaseDriver( git_repo=args.repo, - release_tag=release_mod.Tag(args.release), + release_tag=release_tag, api_key=auth_key, ssh_user=args.ssh_user, - sign_gpg=not args.no_gpg, + sign_gpg=not no_gpg, tasks=tasks, ) automata.run()