mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
buildserver: consolidate boxfile export code into one block
This is just for clarity, and moving more code into the main() function.
This commit is contained in:
parent
daade7656a
commit
299ed82a88
@ -20,7 +20,6 @@ if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
boxfile = os.path.join(os.getcwd(), 'buildserver.box')
|
|
||||||
tail = None
|
tail = None
|
||||||
|
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
@ -69,9 +68,6 @@ elif os.path.exists('makebs.config.py'):
|
|||||||
if '__builtins__' in config:
|
if '__builtins__' in config:
|
||||||
del(config['__builtins__']) # added by compile/exec
|
del(config['__builtins__']) # added by compile/exec
|
||||||
|
|
||||||
if os.path.exists(boxfile):
|
|
||||||
os.remove(boxfile)
|
|
||||||
|
|
||||||
# Update cached files.
|
# Update cached files.
|
||||||
cachedir = config['cachedir']
|
cachedir = config['cachedir']
|
||||||
if not os.path.exists(cachedir):
|
if not os.path.exists(cachedir):
|
||||||
@ -471,6 +467,9 @@ def main():
|
|||||||
v.halt()
|
v.halt()
|
||||||
|
|
||||||
print("Packaging")
|
print("Packaging")
|
||||||
|
boxfile = os.path.join(os.getcwd(), 'buildserver.box')
|
||||||
|
if os.path.exists(boxfile):
|
||||||
|
os.remove(boxfile)
|
||||||
v.package(output=boxfile)
|
v.package(output=boxfile)
|
||||||
|
|
||||||
print("Adding box")
|
print("Adding box")
|
||||||
|
Loading…
Reference in New Issue
Block a user