| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The LUCI Authors. All rights reserved. | 2 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
| 4 # found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """Given current git checkout state return version string to use for an app.""" | 6 """Given current git checkout state return version string to use for an app.""" |
| 7 | 7 |
| 8 import contextlib | 8 import contextlib |
| 9 import getpass | 9 import getpass |
| 10 import logging | 10 import logging |
| 11 import optparse | 11 import optparse |
| 12 import os | 12 import os |
| 13 import subprocess | 13 import subprocess |
| 14 import sys | 14 import sys |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 parser.error('Unknown arguments, %s' % args) | 112 parser.error('Unknown arguments, %s' % args) |
| 113 | 113 |
| 114 root = checkout_root(os.getcwd()) | 114 root = checkout_root(os.getcwd()) |
| 115 logging.info('Checkout root is %s', root) | 115 logging.info('Checkout root is %s', root) |
| 116 print calculate_version(root, options.tag) | 116 print calculate_version(root, options.tag) |
| 117 return 0 | 117 return 0 |
| 118 | 118 |
| 119 | 119 |
| 120 if __name__ == '__main__': | 120 if __name__ == '__main__': |
| 121 sys.exit(main()) | 121 sys.exit(main()) |
| OLD | NEW |