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

Unified Diff: remoting/webapp/build-webapp.py

Issue 1107483002: [Chromoting] Update build-webapp to accept a filelist & update GN rules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add 's' to comment Created 5 years, 8 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 | « remoting/BUILD.gn ('k') | remoting/webapp/build_template.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/build-webapp.py
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py
index 979b593aab2b19df90be59b7a10e408fe08cfaa6..c63451c3f14b6c18f475a505dd0e6ccdfbfdd0cb 100755
--- a/remoting/webapp/build-webapp.py
+++ b/remoting/webapp/build-webapp.py
@@ -109,7 +109,8 @@ def processJinjaTemplate(input_file, include_paths, output_file, context):
def buildWebApp(buildtype, version, destination, zip_path,
manifest_template, webapp_type, appid, app_client_id, app_name,
app_description, app_capabilities, manifest_key, files,
- locales_listfile, jinja_paths, service_environment, use_gcd):
+ files_listfile, locales_listfile, jinja_paths,
+ service_environment, use_gcd):
"""Does the main work of building the webapp directory and zipfile.
Args:
@@ -131,6 +132,11 @@ def buildWebApp(buildtype, version, destination, zip_path,
manifest_key: The manifest key for the webapp.
files: An array of strings listing the paths for resources to include
in this webapp.
+ files_listfile: The name of a file containing a list of files, one per
+ line, identifying the resources to include in this webapp. This
Jamie 2015/04/24 23:51:49 Nit: Indentation.
garykac 2015/04/27 15:36:16 Done.
+ is an alternate to specifying the files directly via the 'files'
+ option. The files listed in this file are appended to the files
+ passed via the 'files' option, if any.
locales_listfile: The name of a file containing a list of locales, one per
line, which are copied, along with their directory structure, from
the _locales directory down.
@@ -149,6 +155,12 @@ def buildWebApp(buildtype, version, destination, zip_path,
for s in input:
locales.append(s.rstrip())
+ # Load the files from the files_listfile.
+ if files_listfile:
+ with open(files_listfile) as input:
+ for s in input:
+ files.append(s.rstrip())
+
# Ensure a fresh directory.
try:
shutil.rmtree(destination)
@@ -437,6 +449,7 @@ def main():
parser.add_argument('--appid')
parser.add_argument('--app_client_id', default='')
parser.add_argument('--manifest_key', default='')
+ parser.add_argument('--files_listfile', default='', metavar='PATH')
parser.add_argument('--locales_listfile', default='', metavar='PATH')
parser.add_argument('--jinja_paths', nargs='*', default=[], metavar='PATH')
parser.add_argument('--service_environment', default='', metavar='ENV')
« no previous file with comments | « remoting/BUILD.gn ('k') | remoting/webapp/build_template.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698