aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-04-17 02:47:58 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-04-17 02:47:58 +0300
commit9cf2687426ec7cabf1a8a183a2d6b4a08580f4fb (patch)
treebb299241b5f2183ff765295c73a2cdbb56f59a82 /utils
parent5b9afc6fc7f13b91891fadb73ad57a45cf71724a (diff)
Wrap 1st publishing stage in conditional.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/new-publish/propagate.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/utils/new-publish/propagate.py b/utils/new-publish/propagate.py
index d3786ee..0a4856d 100755
--- a/utils/new-publish/propagate.py
+++ b/utils/new-publish/propagate.py
@@ -27,19 +27,20 @@ if __name__ == "__main__":
if len(args) != 1:
optparser.error("Wrong number of arguments")
- file_list = []
- for root, dirs, files in os.walk(os.path.join(LOCAL_UPLOAD_DIR, args[0])):
- file_list.extend([os.path.join(root, f) for f in files])
- print file_list
- strip = len(LOCAL_UPLOAD_DIR.strip("/").split("/"))
- dir_list = publish.make_dir_struct(file_list, strip=strip)
- print dir_list
- if not options.dry_run:
- publish.create_dir_struct(dir_list, REMOTE_HOST, PUBLISH_USER_NAME,
- options.identity_publish)
- upload_script = publish.make_upload_script(file_list, strip=strip)
- publish.upload_files(upload_script, REMOTE_HOST, PUBLISH_USER_NAME,
- options.identity_publish, options)
+ if options.stage in ("all", "1"):
+ file_list = []
+ for root, dirs, files in os.walk(os.path.join(LOCAL_UPLOAD_DIR, args[0])):
+ file_list.extend([os.path.join(root, f) for f in files])
+ print file_list
+ strip = len(LOCAL_UPLOAD_DIR.strip("/").split("/"))
+ dir_list = publish.make_dir_struct(file_list, strip=strip)
+ print dir_list
+ if not options.dry_run:
+ publish.create_dir_struct(dir_list, REMOTE_HOST, PUBLISH_USER_NAME,
+ options.identity_publish)
+ upload_script = publish.make_upload_script(file_list, strip=strip)
+ publish.upload_files(upload_script, REMOTE_HOST, PUBLISH_USER_NAME,
+ options.identity_publish, options)
if options.stage in ("all", "2"):
job, build = args[0].split("/")