| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The LUCI Authors. All rights reserved. | 2 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
| 4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """Wrapper around GAE SDK tools to simplify working with multi module apps.""" | 6 """Wrapper around GAE SDK tools to simplify working with multi module apps.""" |
| 7 | 7 |
| 8 __version__ = '1.2' | 8 __version__ = '1.2' |
| 9 | 9 |
| 10 import atexit | 10 import atexit |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 print('Aborted.') | 323 print('Aborted.') |
| 324 return 1 | 324 return 1 |
| 325 app.set_default_version(version) | 325 app.set_default_version(version) |
| 326 return 0 | 326 return 0 |
| 327 | 327 |
| 328 | 328 |
| 329 @subcommand.usage('[module_id module_id ...]') | 329 @subcommand.usage('[module_id module_id ...]') |
| 330 def CMDupload(parser, args): | 330 def CMDupload(parser, args): |
| 331 """Uploads a new version of specific (or all) modules of an app. | 331 """Uploads a new version of specific (or all) modules of an app. |
| 332 | 332 |
| 333 Note that module yamls are expected to be named module-<module name>.yaml |
| 334 |
| 333 Version name looks like <number>-<commit sha1>[-tainted-<who>], where: | 335 Version name looks like <number>-<commit sha1>[-tainted-<who>], where: |
| 334 number git commit number, monotonically increases with each commit | 336 number git commit number, monotonically increases with each commit |
| 335 commit sha1 upstream commit hash the branch is based of | 337 commit sha1 upstream commit hash the branch is based of |
| 336 tainted git repo has local modifications compared to upstream branch | 338 tainted git repo has local modifications compared to upstream branch |
| 337 who username who uploads the tainted version | 339 who username who uploads the tainted version |
| 338 | 340 |
| 339 Doesn't make it a default unless --switch is specified. Use 'switch' | 341 Doesn't make it a default unless --switch is specified. Use 'switch' |
| 340 subcommand to change default serving version. | 342 subcommand to change default serving version. |
| 341 """ | 343 """ |
| 342 parser.add_tag_option() | 344 parser.add_tag_option() |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 print >> sys.stderr, str(e) | 506 print >> sys.stderr, str(e) |
| 505 return 1 | 507 return 1 |
| 506 except KeyboardInterrupt: | 508 except KeyboardInterrupt: |
| 507 # Don't dump stack traces on Ctrl+C, it's expected flow in some commands. | 509 # Don't dump stack traces on Ctrl+C, it's expected flow in some commands. |
| 508 print >> sys.stderr, '\nInterrupted' | 510 print >> sys.stderr, '\nInterrupted' |
| 509 return 1 | 511 return 1 |
| 510 | 512 |
| 511 | 513 |
| 512 if __name__ == '__main__': | 514 if __name__ == '__main__': |
| 513 sys.exit(main(sys.argv[1:])) | 515 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |