1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

Write build/running.json only on build

This should reduce the runtime.

Also test if it was written.
This commit is contained in:
Jochen Sprickerhof 2022-10-12 12:07:40 +02:00
parent b3f0f6f77e
commit dfdd29131f
No known key found for this signature in database
GPG Key ID: 5BFFDCC258E69433
2 changed files with 8 additions and 1 deletions

View File

@ -400,6 +400,8 @@ fdroid build:
# each `fdroid build --on-server` run expects sudo, then uninstalls it
- if dpkg --list sudo; then echo "sudo should not be still there"; exit 1; fi
- 'if [ ! -f repo/status/running.json ]; then echo "ERROR: running.json does not exist!"; exit 1; fi'
- 'if [ ! -f repo/status/build.json ]; then echo "ERROR: build.json does not exist!"; exit 1; fi'
# test the plugin API and specifically the fetchsrclibs plugin, which

View File

@ -877,6 +877,9 @@ def trybuild(app, build, build_dir, output_dir, log_dir, also_check_dir,
logging.info("Building version %s (%s) of %s" % (
build.versionName, build.versionCode, app.id))
if not onserver:
common.write_running_status_json(status_output)
if server:
# When using server mode, still keep a local cache of the repo, by
# grabbing the source now.
@ -1070,6 +1073,9 @@ def main():
app['Builds'] = [build]
break
if not options.onserver:
common.write_running_status_json(status_output)
# Build applications...
failed_builds = []
build_succeeded = []
@ -1105,7 +1111,6 @@ def main():
tools_version_log = ''
if not options.onserver:
tools_version_log = common.get_android_tools_version_log()
common.write_running_status_json(status_output)
try:
# For the first build of a particular app, we need to set up