Correzione logica di esecuzione e assegnazione attributi.
This commit is contained in:
parent
b8b80ebdea
commit
7ae5ac182a
2 changed files with 36 additions and 37 deletions
|
@ -37,21 +37,23 @@ def build(arch, language, offline, portable, updatable, download_path, repo_path
|
|||
# Loop a run for each build.
|
||||
obj = loaih.Build(build['query'], arches)
|
||||
|
||||
# Configuration phase
|
||||
obj.language = build['language']
|
||||
obj.offline_help = build['offline_help']
|
||||
obj.portable = build['portable']
|
||||
obj.updatable = True
|
||||
obj.storage_path = config['data']['repo'] if 'repo' in config['data'] and config['data']['repo'] else '/srv/http/appimage.sys42.eu'
|
||||
obj.download_path = config['data']['download'] if 'download' in config['data'] and config['data']['download'] else '/var/tmp/downloads'
|
||||
|
||||
if 'sign' in config['data'] and config['data']['sign']:
|
||||
obj.sign = True
|
||||
|
||||
if 'force' in config['data'] and config['data']['force']:
|
||||
obj.storage_path = config['data']['repo']
|
||||
obj.version_strings()
|
||||
else:
|
||||
obj.check(config['data']['repo'])
|
||||
# Build phase
|
||||
obj.calculate()
|
||||
if not 'force' in config['data'] or not config['data']['force']:
|
||||
obj.check()
|
||||
|
||||
obj.download(config['data']['download'])
|
||||
obj.download()
|
||||
obj.build()
|
||||
obj.checksums()
|
||||
obj.publish()
|
||||
|
@ -60,21 +62,24 @@ def build(arch, language, offline, portable, updatable, download_path, repo_path
|
|||
else:
|
||||
obj = loaih.Build(query, arches)
|
||||
|
||||
# Configuration phase
|
||||
obj.language = language
|
||||
obj.offline_help = offline
|
||||
obj.portable = portable
|
||||
obj.updatable = updatable
|
||||
obj.storage_path = repo_path
|
||||
obj.download_path = download_path
|
||||
|
||||
if sign:
|
||||
obj.sign = True
|
||||
|
||||
if check:
|
||||
obj.check(repo_path)
|
||||
else:
|
||||
obj.storage_path = repo_path
|
||||
obj.version_strings()
|
||||
# Running phase
|
||||
obj.calculate()
|
||||
|
||||
obj.download(download_path)
|
||||
if check:
|
||||
obj.check()
|
||||
|
||||
obj.download()
|
||||
obj.build()
|
||||
obj.checksums()
|
||||
obj.publish()
|
||||
|
|
Reference in a new issue