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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/sdk.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Operations relative to the user's installed Dart SDK. 5 /// Operations relative to the user's installed Dart SDK.
6 library pub.sdk; 6 library pub.sdk;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 import 'package:pub_semver/pub_semver.dart';
11 12
12 import 'io.dart'; 13 import 'io.dart';
13 import 'version.dart';
14 14
15 /// Gets the path to the root directory of the SDK. 15 /// Gets the path to the root directory of the SDK.
16 /// 16 ///
17 /// When running from the actual built SDK, this will be the SDK that contains 17 /// When running from the actual built SDK, this will be the SDK that contains
18 /// the running Dart executable. When running from the repo, it will be the 18 /// the running Dart executable. When running from the repo, it will be the
19 /// "sdk" directory in the Dart repository itself. 19 /// "sdk" directory in the Dart repository itself.
20 final String rootDirectory = 20 final String rootDirectory =
21 runningFromSdk ? _rootDirectory : path.join(repoRoot, "sdk"); 21 runningFromSdk ? _rootDirectory : path.join(repoRoot, "sdk");
22 22
23 /// Gets the path to the root directory of the SDK, assuming that the currently 23 /// Gets the path to the root directory of the SDK, assuming that the currently
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 var version = "$major.$minor.$patch"; 65 var version = "$major.$minor.$patch";
66 if (channel == "be") { 66 if (channel == "be") {
67 // TODO(rnystrom): tools/utils.py includes the svn commit here. Should we? 67 // TODO(rnystrom): tools/utils.py includes the svn commit here. Should we?
68 version += "-edge"; 68 version += "-edge";
69 } else if (channel == "dev") { 69 } else if (channel == "dev") {
70 version += "-dev.$prerelease.$prereleasePatch"; 70 version += "-dev.$prerelease.$prereleasePatch";
71 } 71 }
72 72
73 return new Version.parse(version); 73 return new Version.parse(version);
74 } 74 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/pubspec.dart ('k') | sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698