feat: allow url to be templated to be used on non-rocky forges

This commit is contained in:
Neil Hanlon 2024-07-09 16:23:12 -04:00
parent df55c42db9
commit 416e4f1d10
Signed by untrusted user: neil
GPG Key ID: 705BC21EC3C70F34

View File

@ -38,6 +38,8 @@ parser.add_argument("--dry",help="Do a dry bump for testing",
parser.add_argument("--git-user", default="Release Engineering") parser.add_argument("--git-user", default="Release Engineering")
parser.add_argument("--git-email", default="releng@rockylinux.org") parser.add_argument("--git-email", default="releng@rockylinux.org")
parser.add_argument("--url", default="ssh://git@git.rockylinux.org:22220/staging/src/%s.git",
help="override default URL")
parser.add_argument("--change-user", parser.add_argument("--change-user",
help="Sets the user for the rpm changelog (first last <email>)", help="Sets the user for the rpm changelog (first last <email>)",
default="Release Engineering <releng@rockylinux.org>") default="Release Engineering <releng@rockylinux.org>")
@ -62,10 +64,12 @@ if os.geteuid() == 0:
print('DO NOT RUN AS ROOT') print('DO NOT RUN AS ROOT')
sys.exit(1) sys.exit(1)
default_url = 'ssh://git@git.rockylinux.org:22220/staging/src/%s.git' % args.pkg
if args.sig: if args.sig:
default_url = 'ssh://git@git.rockylinux.org:22220/sig/%s/src/%s.git' % (args.sig, args.pkg) default_url = 'ssh://git@git.rockylinux.org:22220/sig/%s/src/%s.git' % (args.sig, args.pkg)
if args.url:
default_url = getattr(args, 'url').format(pkg=args.pkg)
# functions # functions
workdir = '/var/tmp' workdir = '/var/tmp'
environment = os.environ environment = os.environ