From fc22437d84837413151c1f09ff77e0172763038e Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 1 Aug 2019 18:29:34 +0200 Subject: [PATCH] Fix publication of kiwix-lib-app. --- scripts/upload_kiwix_lib_android_to_bintray.py | 4 ++-- travis/compile_all.py | 12 ++++++------ travis/deploy.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/upload_kiwix_lib_android_to_bintray.py b/scripts/upload_kiwix_lib_android_to_bintray.py index 02e2c34..e31824d 100755 --- a/scripts/upload_kiwix_lib_android_to_bintray.py +++ b/scripts/upload_kiwix_lib_android_to_bintray.py @@ -64,7 +64,7 @@ def create_version(version): print("Bintray Version created!") return True - print("ERROR : Bintray API response {}".format(code)) + print("ERROR : Bintray API response {}".format(rcode)) return False @@ -87,7 +87,7 @@ def upload_archive(version, filename, artefact): return False # Upload the pom file - pom_artefact = os.path.splitext(artefact) + ".pom" + pom_artefact = os.path.splitext(artefact)[0] + ".pom" url = url_template.format(version=version, artefact=pom_artefact) data = generate_pom_file(version) r = requests.put(url, data=data, auth=bintray_auth, params=parameters) diff --git a/travis/compile_all.py b/travis/compile_all.py index 2bf244f..c327afe 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -478,9 +478,9 @@ elif PLATFORM == 'i586_static': elif make_release and PLATFORM == 'flatpak': update_flathub_git() elif PLATFORM == 'android' and 'kiwix-lib-app' in TARGETS: - if make_release and release_versions.get(project) is not None: - postfix = main_project_versions[project] - extra_postfix = release_versions.get(project) + if make_release and release_versions.get('kiwix-lib') is not None: + postfix = main_project_versions['kiwix-lib'] + extra_postfix = release_versions.get('kiwix-lib') if extra_postfix: postfix = "{}-{}".format(postfix, extra_postfix) @@ -492,9 +492,9 @@ elif PLATFORM == 'android' and 'kiwix-lib-app' in TARGETS: json_filename = '{}_bintray_info.json'.format(arr_name) data = { - version: main_project_versions[project], - filename : arr_name, - artefact: 'kiwixlib-5.1.0.aar' + 'version': postfix, + 'filename': arr_name, + 'artefact': arr_name } with open(str(BINTRAY_ARCHIVES_DIR/json_filename), 'w') as f: json.dump(data, f) diff --git a/travis/deploy.sh b/travis/deploy.sh index 4bbaa84..3c890d5 100755 --- a/travis/deploy.sh +++ b/travis/deploy.sh @@ -88,7 +88,7 @@ then then for archive_info in $BINTRAY_ARCHIVES do - ${HOME}/kiwix-build/scripts/upload_kiwix_lib_android_to_bintray.py $archive_info + ${TRAVIS_BUILD_DIR}/scripts/upload_kiwix_lib_android_to_bintray.py $archive_info done fi