First : must have a single specfile.
If we have a multi specfile
1) first: search a basename specfile of git project
2) second: search a first specfile of sorted the multi specfiles.
Change-Id: I2591f74f176ae60a9bbbfb359f65d3ff07942c82
os.path.basename(event['project']))
print 'Multiple specs with no pkg_name.spec. Try %s' % os.path.basename(spec)
if not os.path.isfile(spec):
+ spec = sorted(specs)[0]
+ print 'Multiple sorted(specs)[0] %s' % os.path.basename(spec)
+ if not os.path.isfile(spec):
msg = "The tag %s pushed, but packaging directory contains \n"\
"multiply spec files, backend service can not decide \n"\
"which spec file to use. Please use OBS_PACKAGE \n"\
os.path.basename(event['project']))
print 'Multiple specs with no pkg_name.spec. Try %s' % os.path.basename(spec)
if not os.path.isfile(spec):
+ spec = sorted(specs)[0]
+ print 'Multiple sorted(specs)[0] %s' % os.path.basename(spec)
+ if not os.path.isfile(spec):
msg = "The tag %s pushed, but packaging directory contains "\
"multiply spec files, backend service can not decide "\
"which spec file to use. Please use OBS_PACKAGE "\