| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 # A script which will be invoked from gyp to print the current version of the | 7 # A script which will be invoked from gyp to print the current version of the |
| 8 # SDK. | 8 # SDK. |
| 9 # | 9 # |
| 10 # Usage: print_version | 10 # Usage: print_version |
| 11 # | 11 # |
| 12 | 12 |
| 13 import sys | 13 import sys |
| 14 import utils | 14 import utils |
| 15 | 15 |
| 16 def Main(argv): | 16 def Main(): |
| 17 print(utils.GetVersion()) | 17 version = utils.GetVersion() |
| 18 if not version: |
| 19 print 'Error: Couldn\'t determine version string.' |
| 20 return 1 |
| 21 print version |
| 18 | 22 |
| 19 if __name__ == '__main__': | 23 if __name__ == '__main__': |
| 20 sys.exit(Main(sys.argv)) | 24 sys.exit(Main()) |
| OLD | NEW |