OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
8 # | 8 # |
9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
10 # | 10 # |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 | 418 |
419 | 419 |
420 # Copy import maps | 420 # Copy import maps |
421 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ] | 421 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ] |
422 os.makedirs(join(LIB, 'config')) | 422 os.makedirs(join(LIB, 'config')) |
423 for platform in PLATFORMS: | 423 for platform in PLATFORMS: |
424 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config') | 424 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config') |
425 import_dst = join(LIB, 'config', 'import_' + platform + '.config') | 425 import_dst = join(LIB, 'config', 'import_' + platform + '.config') |
426 copyfile(import_src, import_dst); | 426 copyfile(import_src, import_dst); |
427 | 427 |
428 # Write the 'revision' file | |
429 revision = utils.GetSVNRevision() | |
430 if revision is None: | |
431 sys.stderr.write('Unable to find SVN revision.\n') | |
432 return 1 | |
dgrove
2012/04/18 20:53:05
how does this work for git users? (that's the reas
danrubel
2012/04/18 21:31:39
Ah! Revised. PTAL.
upload_sdk will still catch if
| |
433 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | |
434 f.write(revision + '\n') | |
435 f.close() | |
436 | |
428 move(SDK_tmp, SDK) | 437 move(SDK_tmp, SDK) |
429 | 438 |
430 if __name__ == '__main__': | 439 if __name__ == '__main__': |
431 sys.exit(Main(sys.argv)) | 440 sys.exit(Main(sys.argv)) |
OLD | NEW |