| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Writes a revision number into src/chrome/tools/test/reference_build/REVISON | 7 """Writes a revision number into src/chrome/tools/test/reference_build/REVISON |
| 8 Must be run from the root of a Dartium or multivm checkout. | 8 Must be run from the root of a Dartium or multivm checkout. |
| 9 | 9 |
| 10 Usage: | 10 Usage: |
| 11 $ ./src/dart/tools/bots/set_reference_build_revision.py <revision> | 11 $ ./src/dart/tools/dartium/set_reference_build_revision.py <revision> |
| 12 """ | 12 """ |
| 13 | 13 |
| 14 import os | 14 import os |
| 15 import sys | 15 import sys |
| 16 | 16 |
| 17 def main(argv): | 17 def main(argv): |
| 18 revision = argv[1] | 18 revision = argv[1] |
| 19 output = os.path.join('src', 'chrome', 'tools', | 19 output = os.path.join('src', 'chrome', 'tools', |
| 20 'test', 'reference_build', | 20 'test', 'reference_build', |
| 21 'REQUESTED_REVISION') | 21 'REQUESTED_REVISION') |
| 22 dirname = os.path.dirname(output) | 22 dirname = os.path.dirname(output) |
| 23 if dirname and not os.path.exists(dirname): | 23 if dirname and not os.path.exists(dirname): |
| 24 os.makedirs(dirname) | 24 os.makedirs(dirname) |
| 25 with file(output, 'w') as f: | 25 with file(output, 'w') as f: |
| 26 f.write(revision) | 26 f.write(revision) |
| 27 | 27 |
| 28 if __name__ == '__main__': | 28 if __name__ == '__main__': |
| 29 sys.exit(main(sys.argv)) | 29 sys.exit(main(sys.argv)) |
| OLD | NEW |