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

Side by Side Diff: tools/publish_pkg.py

Issue 11819051: Add again useVmConfiguration for deprecation purposes. This requires adding a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « pkg/unittest/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 153 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
154 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 154 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
155 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 155 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
156 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 156 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
157 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 157 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
158 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 158 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
159 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 159 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
160 '''); 160 ''');
161 161
162 replaceInFiles.append( 162 replaceInFiles.append(
163 (r'(import|part)(\s+)(\'|")(\.\./)+pkg/', r'\1\2\3package:')) 163 (r'(import|part)(\s+)(\'|")(\.\./)+pkg/([^/]+/)lib/', r'\1\2\3package:\5'))
164 164
165 # Replace '../*/pkg' imports and parts. 165 # Replace '../*/pkg' imports and parts.
166 for root, dirs, files in os.walk(os.path.join(tmpDir, pkgName)): 166 for root, dirs, files in os.walk(os.path.join(tmpDir, pkgName)):
167 # TODO(dgrove): Remove this when dartbug.com/7487 is fixed. 167 # TODO(dgrove): Remove this when dartbug.com/7487 is fixed.
168 if '.svn' in dirs: 168 if '.svn' in dirs:
169 shutil.rmtree(os.path.join(root, '.svn')) 169 shutil.rmtree(os.path.join(root, '.svn'))
170 for name in files: 170 for name in files:
171 if name.endswith('.dart'): 171 if name.endswith('.dart'):
172 ReplaceInFiles([os.path.join(root, name)], replaceInFiles) 172 ReplaceInFiles([os.path.join(root, name)], replaceInFiles)
173 173
174 print 'publishing version ' + version + ' of ' + argv[1] + ' to pub.\n' 174 print 'publishing version ' + version + ' of ' + argv[1] + ' to pub.\n'
175 subprocess.call(['pub', 'publish'], cwd=os.path.join(tmpDir, pkgName)) 175 subprocess.call(['pub', 'publish'], cwd=os.path.join(tmpDir, pkgName))
176 shutil.rmtree(tmpDir) 176 shutil.rmtree(tmpDir)
177 177
178 if __name__ == '__main__': 178 if __name__ == '__main__':
179 sys.exit(Main(sys.argv)) 179 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « pkg/unittest/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698