From a884668c765b431f51190024e79f330b7771eb41 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 21 Mar 2018 16:08:52 +0100 Subject: [PATCH] [TRAVIS] Copy release archive in the right subdirectory. This way, deploy.sh can upload the archive at the right place. --- travis/compile_all.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/travis/compile_all.py b/travis/compile_all.py index 9d3b914..b5c4a5a 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -226,16 +226,22 @@ if make_release and PLATFORM == 'native_dyn': else: out_dir = DIST_ZIM_ARCHIVES_DIR - if target in ('kiwix-lib', 'kiwix-tools', 'libzim', 'zim-tools'): - shutil.copy(str(BASE_DIR/target/'meson-dist'/'{}-{}.tar.xz'.format( - target, - dependency_versions.main_project_versions[target])), - str(out_dir)) - if target in ('zimwriterfs',): - shutil.copy(str(BASE_DIR/target/'{}-{}.tar.gz'.format( - target, - dependency_versions.main_project_versions[target])), - str(out_dir)) + if target in ('kiwix-lib', 'kiwix-tools', 'libzim', 'zim-tools', 'zimwriterfs'): + try: + (out_dir/target).mkdir(parents=True) + except FileExistsError: + pass + + if target == 'zimwriterfs': + in_file = BASE_DIR/target/'{}-{}.tar.gz'.format( + target, + dependency_versions.main_project_versions[target]) + else: + in_file = BASE_DIR/target/'meson-dist'/'{}-{}.tar.xz'.format( + target, + dependency_versions.main_project_versions[target]) + + shutil.copy(str(in_file), str(out_dir/target)) elif PLATFORM == 'native_static': for target in ('kiwix-tools', 'zim-tools', 'zimwriterfs'): make_archive(target, 'linux64')