mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 02:36:15 +01:00
fix local build using simpleimage
This commit is contained in:
parent
cf96f85590
commit
024759bee0
11
osc/build.py
11
osc/build.py
@ -374,6 +374,11 @@ def get_built_files(pacdir, buildtype):
|
|||||||
'-name', '*.AppImage'],
|
'-name', '*.AppImage'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
s_built = ''
|
s_built = ''
|
||||||
|
elif buildtype == 'simpleimage':
|
||||||
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'SIMPLEIMAGE'),
|
||||||
|
'-type', '-f'],
|
||||||
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
|
s_built = ''
|
||||||
else:
|
else:
|
||||||
print('WARNING: Unknown package type \'%s\'.' % buildtype, file=sys.stderr)
|
print('WARNING: Unknown package type \'%s\'.' % buildtype, file=sys.stderr)
|
||||||
b_built = ''
|
b_built = ''
|
||||||
@ -538,13 +543,15 @@ def main(apiurl, opts, argv):
|
|||||||
build_type = 'appimage'
|
build_type = 'appimage'
|
||||||
if os.path.basename(build_descr) == 'snapcraft.yaml':
|
if os.path.basename(build_descr) == 'snapcraft.yaml':
|
||||||
build_type = 'snapcraft'
|
build_type = 'snapcraft'
|
||||||
|
if os.path.basename(build_descr) == 'simpleimage':
|
||||||
|
build_type = 'simpleimage'
|
||||||
if os.path.basename(build_descr) == 'Dockerfile':
|
if os.path.basename(build_descr) == 'Dockerfile':
|
||||||
build_type = 'docker'
|
build_type = 'docker'
|
||||||
if os.path.basename(build_descr) == 'fissile.yml':
|
if os.path.basename(build_descr) == 'fissile.yml':
|
||||||
build_type = 'fissile'
|
build_type = 'fissile'
|
||||||
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'snapcraft', 'appimage', 'docker', 'podman', 'fissile']:
|
if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 'livebuild', 'simpleimage', 'snapcraft', 'appimage', 'docker', 'podman', 'fissile']:
|
||||||
raise oscerr.WrongArgs(
|
raise oscerr.WrongArgs(
|
||||||
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, appimage.yml, snapcraft.yaml or Dockerfile' \
|
'Unknown build type: \'%s\'. Build description should end in .spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, simpleimage, appimage.yml, snapcraft.yaml or Dockerfile' \
|
||||||
% build_type)
|
% build_type)
|
||||||
if not os.path.isfile(build_descr):
|
if not os.path.isfile(build_descr):
|
||||||
raise oscerr.WrongArgs('Error: build description file named \'%s\' does not exist.' % build_descr)
|
raise oscerr.WrongArgs('Error: build description file named \'%s\' does not exist.' % build_descr)
|
||||||
|
Loading…
Reference in New Issue
Block a user