Verified Commit 53d6abfd authored by Adam Mercer's avatar Adam Mercer
Browse files

add --git option

this is for when the source is a git repository url
parent df8690a2
...@@ -48,16 +48,19 @@ def parse_options(): ...@@ -48,16 +48,19 @@ def parse_options():
koji_options.add_argument('--target', default=__target__, koji_options.add_argument('--target', default=__target__,
help='Koji tag to tag (%s)' % __target__) help='Koji tag to tag (%s)' % __target__)
source_options = parser.add_argument_group('Source Options') source_options = parser.add_argument_group('Source Options')
source_options.add_argument('--git', action='store_true',
help='Source is from git')
source_options.add_argument('source', help='Source to build with Koji') source_options.add_argument('source', help='Source to build with Koji')
# parse options # parse options
args = parser.parse_args() args = parser.parse_args()
# check that source-rpm exists # check that source-rpm exists
source = pathlib.Path(args.source) if args.git:
if not source.is_file(): source = pathlib.Path(args.source)
print('File %s does not exist.' % args.source) if not source.is_file():
sys.exit(1) print('File %s does not exist.' % args.source)
sys.exit(1)
return args return args
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment