Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: mojo/tools/upload_binaries.py

Issue 912023004: Update latest version of shell/apps on per-platform basis. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Add TODO Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/upload_binaries.py
diff --git a/mojo/tools/upload_binaries.py b/mojo/tools/upload_binaries.py
index 3de1d882bae5571c714d8d523bd26b91e663d571..593b86fba9f7da5e345fcc8d0e61ecb84252cf65 100755
--- a/mojo/tools/upload_binaries.py
+++ b/mojo/tools/upload_binaries.py
@@ -24,6 +24,9 @@ BLACKLISTED_APPS = [
"network_service_apptests.mojo",
]
+def target(config):
+ return config.target_os + "-" + config.target_arch
+
def find_apps_to_upload(build_dir):
apps = []
for path in glob.glob(build_dir + "/*"):
@@ -53,7 +56,9 @@ def upload(config, source, dest, dry_run):
def upload_shell(config, dry_run, verbose):
paths = Paths(config)
- zipfile_name = "%s-%s" % (config.target_os, config.target_arch)
+ zipfile_name = target(config)
+ # TODO(blundell): Change this to be in the same structure as the LATEST files,
+ # e.g., gs://mojo/shell/linux-x64/<version>/shell.zip.
dest = "gs://mojo/shell/" + Version().version + "/" + zipfile_name + ".zip"
with tempfile.NamedTemporaryFile() as zip_file:
with zipfile.ZipFile(zip_file, 'w') as z:
@@ -75,9 +80,9 @@ def upload_shell(config, dry_run, verbose):
def upload_app(app_binary_path, config, dry_run):
app_binary_name = os.path.basename(app_binary_path)
- target = config.target_os + "-" + config.target_arch
version = Version().version
- dest = "gs://mojo/services/" + target + "/" + version + "/" + app_binary_name
+ dest = ("gs://mojo/services/" + target(config) + "/" + version + "/" +
+ app_binary_name)
upload(config, app_binary_path, dest, dry_run)
def update_version(config, subdir, dry_run):
@@ -85,7 +90,7 @@ def update_version(config, subdir, dry_run):
version = Version().version
temp_version_file.write(version)
temp_version_file.flush()
- dest = "gs://mojo/%s/LATEST" % subdir
+ dest = "gs://mojo/%s/%s/LATEST" % (subdir, target(config))
upload(config, temp_version_file.name, dest, dry_run)
def main():
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698