| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, 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 | 7 |
| 8 # Script to build a tarball of the Dart source. | 8 # Script to build a tarball of the Dart source. |
| 9 # | 9 # |
| 10 # The tarball includes all the source needed to build Dart. This | 10 # The tarball includes all the source needed to build Dart. This |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 with open(filename, 'w') as f: | 97 with open(filename, 'w') as f: |
| 98 f.write('dart (%s-1) UNRELEASED; urgency=low\n' % version) | 98 f.write('dart (%s-1) UNRELEASED; urgency=low\n' % version) |
| 99 f.write('\n') | 99 f.write('\n') |
| 100 f.write(' * Generated file.\n') | 100 f.write(' * Generated file.\n') |
| 101 f.write('\n') | 101 f.write('\n') |
| 102 f.write(' -- Dart Team <misc@dartlang.org> %s\n' % | 102 f.write(' -- Dart Team <misc@dartlang.org> %s\n' % |
| 103 datetime.datetime.utcnow().strftime('%a, %d %b %Y %X +0000')) | 103 datetime.datetime.utcnow().strftime('%a, %d %b %Y %X +0000')) |
| 104 | 104 |
| 105 def GenerateSvnRevision(filename, svn_revision): | 105 def GenerateSvnRevision(filename, svn_revision): |
| 106 with open(filename, 'w') as f: | 106 with open(filename, 'w') as f: |
| 107 f.write(svn_revision) | 107 f.write(str(svn_revision)) |
| 108 | 108 |
| 109 | 109 |
| 110 def CreateTarball(tarfilename): | 110 def CreateTarball(tarfilename): |
| 111 global ignoredPaths # Used for adding the output directory. | 111 global ignoredPaths # Used for adding the output directory. |
| 112 # Generate the name of the tarfile | 112 # Generate the name of the tarfile |
| 113 version = utils.GetVersion() | 113 version = utils.GetVersion() |
| 114 global versiondir | 114 global versiondir |
| 115 versiondir = 'dart-%s' % version | 115 versiondir = 'dart-%s' % version |
| 116 debian_dir = 'tools/linux_dist_support/debian' | 116 debian_dir = 'tools/linux_dist_support/debian' |
| 117 # Don't include the build directory in the tarball (ignored paths | 117 # Don't include the build directory in the tarball (ignored paths |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 tar_filename = options.tar_filename | 159 tar_filename = options.tar_filename |
| 160 if not tar_filename: | 160 if not tar_filename: |
| 161 tar_filename = join(DART_DIR, | 161 tar_filename = join(DART_DIR, |
| 162 utils.GetBuildDir(HOST_OS), | 162 utils.GetBuildDir(HOST_OS), |
| 163 'dart-%s.tar.gz' % utils.GetVersion()) | 163 'dart-%s.tar.gz' % utils.GetVersion()) |
| 164 | 164 |
| 165 CreateTarball(tar_filename) | 165 CreateTarball(tar_filename) |
| 166 | 166 |
| 167 if __name__ == '__main__': | 167 if __name__ == '__main__': |
| 168 sys.exit(Main()) | 168 sys.exit(Main()) |
| OLD | NEW |