From d15393e85d01db6a4a7cbed4ccdac60971e8dd9b Mon Sep 17 00:00:00 2001 From: Milo Casagrande Date: Tue, 24 Dec 2013 09:39:59 +0100 Subject: Make the B-I rewrite happen only for android jobs. --- scripts/publish_to_snapshots.py | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'scripts') diff --git a/scripts/publish_to_snapshots.py b/scripts/publish_to_snapshots.py index 074f3c0..22c6851 100755 --- a/scripts/publish_to_snapshots.py +++ b/scripts/publish_to_snapshots.py @@ -434,13 +434,7 @@ class SnapshotsPublisher(object): common_bi.splice(tmp_bi) -def rewrite_build_info(build_dir_path, target_dir_path, tmp_bi, job_type): - - if job_type == 'prebuilt': - for _, subdirs, _ in os.walk(build_dir_path): - for element in subdirs: - target_dir_path = os.path.join(target_dir_path, element) - +def rewrite_build_info(build_dir_path, target_dir_path, tmp_bi): bi_path = os.path.join(target_dir_path, BUILDINFO) if os.path.getsize(tmp_bi) > 0: shutil.copy(tmp_bi, bi_path) @@ -450,15 +444,6 @@ def rewrite_build_info(build_dir_path, target_dir_path, tmp_bi, job_type): bi.splice(bi_path) -def combine_build_info(publisher, build_dir_path, target_dir_path, tmp_bi, - job_type): - if job_type == 'prebuilt': - for _, subdirs, _ in os.walk(build_dir_path): - for element in subdirs: - target_dir_path = os.path.join(target_dir_path, element) - publisher.combine_buildinfo(build_dir_path, target_dir_path, tmp_bi) - - def main(): global uploads_path global target_path @@ -493,17 +478,20 @@ def main(): os.chmod(tmp_bi, 0644) try: - combine_build_info( - publisher, build_dir_path, target_dir_path, tmp_bi, - args.job_type) + if args.job_type == 'android': + publisher.combine_buildinfo( + build_dir_path, target_dir_path, tmp_bi) + ret = publisher.move_artifacts( args, build_dir_path, target_dir_path) + if ret != PASS: print "Move Failed" return FAIL else: - rewrite_build_info( - build_dir_path, target_dir_path, tmp_bi, args.job_type) + if args.job_type == 'android': + rewrite_build_info( + build_dir_path, target_dir_path, tmp_bi) print "Move succeeded" return PASS finally: -- cgit v1.2.3