aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-12-24 09:39:59 +0100
committerMilo Casagrande <milo@ubuntu.com>2013-12-24 09:39:59 +0100
commitd15393e85d01db6a4a7cbed4ccdac60971e8dd9b (patch)
treee9f2606604ac7c05ed3c934874654b42d8d997ae /scripts
parentcd83fd6b0d0e4617ca160eae718da9f75a5ab831 (diff)
Make the B-I rewrite happen only for android jobs.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/publish_to_snapshots.py30
1 files changed, 9 insertions, 21 deletions
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: