add custom dist support for git import

This commit is contained in:
Louis Abel 2024-09-24 01:46:46 -07:00
parent 40392e474e
commit cb0df67a27
Signed by: label
GPG Key ID: 2A6975660E424560
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ parser.add_argument('--gitorg', type=str, required=False, default='rpms')
parser.add_argument('--dest-branch', type=str, required=False, default='') parser.add_argument('--dest-branch', type=str, required=False, default='')
parser.add_argument('--release', type=str, required=False, default='') parser.add_argument('--release', type=str, required=False, default='')
parser.add_argument('--distprefix', type=str, required=False, default='el') parser.add_argument('--distprefix', type=str, required=False, default='el')
parser.add_argument('--distcustom', type=str, required=False, default='')
parser.add_argument('--upstream-lookaside', type=str, required=True) parser.add_argument('--upstream-lookaside', type=str, required=True)
parser.add_argument('--alternate-spec-name', type=str, required=False, default='', help='e.g. if kernel-rt, use kernel') parser.add_argument('--alternate-spec-name', type=str, required=False, default='', help='e.g. if kernel-rt, use kernel')
results = parser.parse_args() results = parser.parse_args()
@ -28,6 +29,7 @@ classy = importutil.GitImport(
dest_branch=results.dest_branch, dest_branch=results.dest_branch,
upstream_lookaside=results.upstream_lookaside, upstream_lookaside=results.upstream_lookaside,
distprefix=results.distprefix, distprefix=results.distprefix,
distcustom=results.distcustom,
alternate_spec_name=results.alternate_spec_name alternate_spec_name=results.alternate_spec_name
) )

View File

@ -640,6 +640,7 @@ class GitImport(Import):
source_git_protocol: str = 'https', source_git_protocol: str = 'https',
dest_branch: str = '', dest_branch: str = '',
distprefix: str = 'el', distprefix: str = 'el',
distcustom: str = '',
source_git_user: str = 'git', source_git_user: str = 'git',
dest_git_user: str = 'git', dest_git_user: str = 'git',
dest_org: str = 'rpms', dest_org: str = 'rpms',
@ -679,6 +680,9 @@ class GitImport(Import):
self.__aws_access_key = aws_access_key self.__aws_access_key = aws_access_key
self.__aws_bucket = aws_bucket self.__aws_bucket = aws_bucket
if len(distcustom) > 0:
self.__dist_tag = f'.{distcustom}'
if len(dest_branch) > 0: if len(dest_branch) > 0:
self.__dest_branch = dest_branch self.__dest_branch = dest_branch