Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Side by Side Diff: tools/publish_pkg.py

Issue 22375011: move html5lib code into dart svn repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: change location of html5lib to pkg/third_party/html5lib Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, 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 # Script to push a package to pub. 7 # Script to push a package to pub.
8 # 8 #
9 # Usage: publish_pkg.py pkg_dir 9 # Usage: publish_pkg.py pkg_dir
10 # 10 #
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 shutil.copy(libpath, os.path.join(tmpDir, pkgName, 'lib/libraries.dart')) 132 shutil.copy(libpath, os.path.join(tmpDir, pkgName, 'lib/libraries.dart'))
133 133
134 # Replace '../../libraries.dart' with '../libraries.dart' 134 # Replace '../../libraries.dart' with '../libraries.dart'
135 replaceInDart.append( 135 replaceInDart.append(
136 (r'(import|part)(\s+)(\'|")\.\./(\.\./)*libraries.dart', 136 (r'(import|part)(\s+)(\'|")\.\./(\.\./)*libraries.dart',
137 r'\1\2\3\4libraries.dart')) 137 r'\1\2\3\4libraries.dart'))
138 138
139 if not os.path.exists(os.path.join(tmpDir, pkgName, 'LICENSE')): 139 if not os.path.exists(os.path.join(tmpDir, pkgName, 'LICENSE')):
140 with open(os.path.join(tmpDir, pkgName, 'LICENSE'), 'w') as licenseFile: 140 with open(os.path.join(tmpDir, pkgName, 'LICENSE'), 'w') as licenseFile:
141 licenseFile.write( 141 licenseFile.write(
142 '''Copyright 2012, the Dart project authors. All rights reserved. 142 '''Copyright 2013, the Dart project authors. All rights reserved.
143 Redistribution and use in source and binary forms, with or without 143 Redistribution and use in source and binary forms, with or without
144 modification, are permitted provided that the following conditions are 144 modification, are permitted provided that the following conditions are
145 met: 145 met:
146 146
147 * Redistributions of source code must retain the above copyright 147 * Redistributions of source code must retain the above copyright
148 notice, this list of conditions and the following disclaimer. 148 notice, this list of conditions and the following disclaimer.
149 * Redistributions in binary form must reproduce the above 149 * Redistributions in binary form must reproduce the above
150 copyright notice, this list of conditions and the following 150 copyright notice, this list of conditions and the following
151 disclaimer in the documentation and/or other materials provided 151 disclaimer in the documentation and/or other materials provided
152 with the distribution. 152 with the distribution.
(...skipping 27 matching lines...) Expand all
180 ReplaceInFiles([os.path.join(root, name)], replaceInDart) 180 ReplaceInFiles([os.path.join(root, name)], replaceInDart)
181 elif name == 'pubspec.yaml': 181 elif name == 'pubspec.yaml':
182 ReplaceInFiles([os.path.join(root, name)], replaceInPubspec) 182 ReplaceInFiles([os.path.join(root, name)], replaceInPubspec)
183 183
184 print 'publishing version ' + version + ' of ' + argv[1] + ' to pub.\n' 184 print 'publishing version ' + version + ' of ' + argv[1] + ' to pub.\n'
185 subprocess.call(['pub', 'publish'], cwd=os.path.join(tmpDir, pkgName)) 185 subprocess.call(['pub', 'publish'], cwd=os.path.join(tmpDir, pkgName))
186 shutil.rmtree(tmpDir) 186 shutil.rmtree(tmpDir)
187 187
188 if __name__ == '__main__': 188 if __name__ == '__main__':
189 sys.exit(Main(sys.argv)) 189 sys.exit(Main(sys.argv))
OLDNEW
« pkg/third_party/html5lib/html5lib.status ('K') | « tools/publish_all_pkgs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698