forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_to_fuchsia.py
executable file
·44 lines (33 loc) · 1.5 KB
/
deploy_to_fuchsia.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env vpython3
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A script for deploying Chrome binaries to a Fuchsia checkout."""
import argparse
import os
import sys
from common import read_package_paths, register_common_args
from compatible_utils import install_symbols
from publish_package import publish_packages
def register_fuchsia_args(parser: argparse.ArgumentParser) -> None:
"""Register common arguments for deploying to Fuchsia."""
fuchsia_args = parser.add_argument_group(
'fuchsia', 'Arguments for working with Fuchsia checkout.')
fuchsia_args.add_argument('--fuchsia-out-dir',
help='Path to output directory of a local '
'Fuchsia checkout.')
def main():
"""Stand-alone program for deploying to the output directory of a local
Fuchsia checkout."""
parser = argparse.ArgumentParser()
parser.add_argument('package', help='The package to deploy to Fuchsia.')
register_common_args(parser)
register_fuchsia_args(parser)
args = parser.parse_args()
fuchsia_out_dir = os.path.expanduser(args.fuchsia_out_dir)
package_paths = read_package_paths(args.out_dir, args.package)
publish_packages(package_paths, os.path.join(fuchsia_out_dir,
'amber-files'))
install_symbols(package_paths, fuchsia_out_dir)
if __name__ == '__main__':
sys.exit(main())