def main(): parser = argparse.ArgumentParser( description="Upload binaries for apps and " "the Mojo shell to google storage (by default on Linux, but this can be " "changed via options).") parser.add_argument("-n", "--dry_run", help="Dry run, do not actually " + "upload", action="store_true") parser.add_argument("-v", "--verbose", help="Verbose mode", action="store_true") parser.add_argument("--android", action="store_true", help="Upload the shell and apps for Android") args = parser.parse_args() target_os = Config.OS_LINUX if args.android: target_os = Config.OS_ANDROID config = Config(target_os=target_os, is_debug=False) upload_shell(config, args.dry_run, args.verbose) update_version(config, "shell", args.dry_run) apps_to_upload = find_apps_to_upload( gn.BuildDirectoryForConfig(config, Paths(config).src_root)) for app in apps_to_upload: upload_app(app, config, args.dry_run) update_version(config, "services", args.dry_run) return 0
def main(): parser = argparse.ArgumentParser(description="Upload binaries for apps and " "the Mojo shell to google storage (by default on Linux, but this can be " "changed via options).") parser.add_argument("-n", "--dry_run", help="Dry run, do not actually "+ "upload", action="store_true") parser.add_argument("-v", "--verbose", help="Verbose mode", action="store_true") parser.add_argument("--android", action="store_true", help="Upload the shell and apps for Android") parser.add_argument("--official", action="store_true", help="Upload the official build of the Android shell") parser.add_argument("-p", "--use-default-path-for-gsutil", action="store_true", help=("Use default $PATH location for finding gsutil." " Helpful when gcloud sdk has been installed and $PATH has been set.")) parser.add_argument("--symbols-upload-url", action="append", default=[], help="URL of the server to upload breakpad symbols to") parser.add_argument("-u", "--upload-location", default="gs://mojo/", help="root URL of the server to upload binaries to") args = parser.parse_args() is_official_build = args.official target_os = Config.OS_LINUX if args.android: target_os = Config.OS_ANDROID elif is_official_build: print "Uploading official builds is only supported for android." return 1 config = Config(target_os=target_os, is_debug=False, is_official_build=is_official_build, upload_location=args.upload_location, use_default_path_for_gsutil=args.use_default_path_for_gsutil, verbose=args.verbose) upload_shell(config, args.dry_run, args.verbose) if is_official_build: print "Skipping uploading apps (official apk build)." return 0 build_directory = gn.BuildDirectoryForConfig(config, Paths(config).src_root) apps_to_upload = find_apps_to_upload(build_directory) for app in apps_to_upload: upload_app(app, config, args.dry_run) upload_symbols(config, build_directory, args.symbols_upload_url, args.dry_run) upload_dart_snapshotter(config, args.dry_run, args.verbose) upload_system_thunks_lib(config, args.dry_run) return 0
def main(): parser = argparse.ArgumentParser( description="Upload binaries for apps and " "the Mojo shell to google storage (by default on Linux, but this can be " "changed via options).") parser.add_argument("-n", "--dry_run", help="Dry run, do not actually " + "upload", action="store_true") parser.add_argument("-v", "--verbose", help="Verbose mode", action="store_true") parser.add_argument("--android", action="store_true", help="Upload the shell and apps for Android") parser.add_argument("--official", action="store_true", help="Upload the official build of the Android shell") parser.add_argument("--symbols-upload-url", action="append", default=[], help="URL of the server to upload breakpad symbols to") args = parser.parse_args() is_official_build = args.official target_os = Config.OS_LINUX if args.android: target_os = Config.OS_ANDROID elif is_official_build: print "Uploading official builds is only supported for android." return 1 config = Config(target_os=target_os, is_debug=False, is_official_build=is_official_build) upload_shell(config, args.dry_run, args.verbose) if is_official_build: print "Skipping uploading apps (official apk build)." return 0 build_directory = gn.BuildDirectoryForConfig(config, Paths(config).src_root) apps_to_upload = find_apps_to_upload(build_directory) for app in apps_to_upload: upload_app(app, config, args.dry_run) files_to_upload = find_architecture_independent_files(build_directory) for file_to_upload in files_to_upload: upload_file(file_to_upload, config, args.dry_run) upload_symbols(config, build_directory, args.symbols_upload_url, args.dry_run) return 0