mirror of
https://github.com/peridotbuild/pv2.git
synced 2024-11-25 06:31:26 +00:00
60e210aaa6
* Add ModuleImport class to import module repos * Add import_git.py example of using GitImport
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
#!/usr/bin/python3
|
|
|
|
import argparse
|
|
import pv2.importer as importutil
|
|
|
|
parser = argparse.ArgumentParser(description="Importer")
|
|
|
|
parser.add_argument('--srpm', type=str, required=True)
|
|
parser.add_argument('--source-giturl', type=str, required=True)
|
|
parser.add_argument('--source-gitorg', type=str, required=True)
|
|
parser.add_argument('--branch', type=str, required=True)
|
|
parser.add_argument('--giturl', type=str, required=True)
|
|
parser.add_argument('--gitorg', type=str, required=False, default='rpms')
|
|
parser.add_argument('--dest-branch', 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('--upstream-lookaside', type=str, required=True)
|
|
results = parser.parse_args()
|
|
classy = importutil.GitImport(
|
|
results.srpm,
|
|
source_git_url_path=results.source_giturl,
|
|
source_git_org_path=results.source_gitorg,
|
|
git_url_path=results.giturl,
|
|
org=results.gitorg,
|
|
release=results.release,
|
|
branch=results.branch,
|
|
dest_branch=results.dest_branch,
|
|
upstream_lookaside=results.upstream_lookaside,
|
|
distprefix=results.distprefix
|
|
)
|
|
|
|
classy.pkg_import()
|