OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Creates a directory with with the unpacked contents of the remoting webapp. | 6 """Creates a directory with with the unpacked contents of the remoting webapp. |
7 | 7 |
8 The directory will contain a copy-of or a link-to to all remoting webapp | 8 The directory will contain a copy-of or a link-to to all remoting webapp |
9 resources. This includes HTML/JS and any plugin binaries. The script also | 9 resources. This includes HTML/JS and any plugin binaries. The script also |
10 massages resulting files appropriately with host plugin data. Finally, | 10 massages resulting files appropriately with host plugin data. Finally, |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 # being generated correctly (no overrides) and with the correct buildtype. | 240 # being generated correctly (no overrides) and with the correct buildtype. |
241 # They also verify that folks are not accidentally building dev/test/staging | 241 # They also verify that folks are not accidentally building dev/test/staging |
242 # apps for release (no impersonation) instead of dev. | 242 # apps for release (no impersonation) instead of dev. |
243 if is_prod_service_environment and buildtype == 'Dev': | 243 if is_prod_service_environment and buildtype == 'Dev': |
244 raise Exception("Prod environment cannot be built for 'dev' builds") | 244 raise Exception("Prod environment cannot be built for 'dev' builds") |
245 | 245 |
246 if buildtype != 'Dev': | 246 if buildtype != 'Dev': |
247 if not is_prod_service_environment: | 247 if not is_prod_service_environment: |
248 raise Exception('Invalid service_environment targeted for ' | 248 raise Exception('Invalid service_environment targeted for ' |
249 + buildtype + ': ' + service_environment) | 249 + buildtype + ': ' + service_environment) |
250 if 'out/Release' not in destination and 'out\Release' not in destination: | |
251 raise Exception('Prod builds must be placed in the out/Release folder') | |
joedow
2015/05/08 17:16:36
I think we can remove this check but we just need
| |
252 if appid != None: | 250 if appid != None: |
253 raise Exception('Cannot pass in an appid for ' | 251 raise Exception('Cannot pass in an appid for ' |
254 + buildtype + ' builds: ' + service_environment) | 252 + buildtype + ' builds: ' + service_environment) |
255 if appRemotingApiHost != None: | 253 if appRemotingApiHost != None: |
256 raise Exception('Cannot set APP_REMOTING_API_HOST env var for ' | 254 raise Exception('Cannot set APP_REMOTING_API_HOST env var for ' |
257 + buildtype + ' builds') | 255 + buildtype + ' builds') |
258 if appRemotingApplicationId != None: | 256 if appRemotingApplicationId != None: |
259 raise Exception('Cannot set APP_REMOTING_APPLICATION_ID env var for ' | 257 raise Exception('Cannot set APP_REMOTING_APPLICATION_ID env var for ' |
260 + buildtype + ' builds') | 258 + buildtype + ' builds') |
261 | 259 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') | 456 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') |
459 | 457 |
460 args = parser.parse_args() | 458 args = parser.parse_args() |
461 args.use_gcd = (args.use_gcd != '0') | 459 args.use_gcd = (args.use_gcd != '0') |
462 args.app_capabilities = set(args.app_capabilities) | 460 args.app_capabilities = set(args.app_capabilities) |
463 return buildWebApp(**vars(args)) | 461 return buildWebApp(**vars(args)) |
464 | 462 |
465 | 463 |
466 if __name__ == '__main__': | 464 if __name__ == '__main__': |
467 sys.exit(main()) | 465 sys.exit(main()) |
OLD | NEW |