1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 19:10:11 +01:00

moved version android tools version log header to corresponding function

This commit is contained in:
Michael Pöhn 2017-03-22 14:56:26 +01:00
parent 0fda23ef80
commit 843595eb33

View File

@ -407,7 +407,6 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
chan.exec_command('bash --login -c "' + cmdline + '"') chan.exec_command('bash --login -c "' + cmdline + '"')
output = bytes() output = bytes()
output += b'== Installed Android Tools ==\n\n'
output += get_android_tools_version_log(build.ndk_path()).encode() output += get_android_tools_version_log(build.ndk_path()).encode()
while not chan.exit_status_ready(): while not chan.exit_status_ready():
while chan.recv_ready(): while chan.recv_ready():
@ -554,7 +553,6 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
log_path = os.path.join(log_dir, log_path = os.path.join(log_dir,
common.get_toolsversion_logname(app, build)) common.get_toolsversion_logname(app, build))
with open(log_path, 'w') as f: with open(log_path, 'w') as f:
f.write('== Installed Android Tools ==\n\n')
f.write(get_android_tools_version_log(build.ndk_path())) f.write(get_android_tools_version_log(build.ndk_path()))
# Prepare the source code... # Prepare the source code...
@ -1018,7 +1016,7 @@ def get_android_tools_versions(ndk_path=None):
def get_android_tools_version_log(ndk_path): def get_android_tools_version_log(ndk_path):
'''get a list of the versions of all installed Android SDK/NDK components''' '''get a list of the versions of all installed Android SDK/NDK components'''
log = '' log = '== Installed Android Tools ==\n\n'
components = get_android_tools_versions(ndk_path) components = get_android_tools_versions(ndk_path)
for name, version in sorted(components): for name, version in sorted(components):
log += '* ' + name + ' (' + version + ')\n' log += '* ' + name + ' (' + version + ')\n'
@ -1179,8 +1177,7 @@ def main():
wikilog = None wikilog = None
tools_version_log = '' tools_version_log = ''
if not options.onserver: if not options.onserver:
tools_version_log = '== Installed Android Tools ==\n\n' tools_version_log = get_android_tools_version_log(build.ndk_path())
tools_version_log += get_android_tools_version_log(build.ndk_path())
try: try:
# For the first build of a particular app, we need to set up # For the first build of a particular app, we need to set up