aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: