OLD | NEW |
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; | |
7 | |
8 import 'dart:io'; | 6 import 'dart:io'; |
9 | 7 |
10 import 'package:path/path.dart' as p; | 8 import 'package:path/path.dart' as p; |
11 import 'package:pub_semver/pub_semver.dart'; | 9 import 'package:pub_semver/pub_semver.dart'; |
12 | 10 |
13 import 'io.dart'; | 11 import 'io.dart'; |
14 | 12 |
15 /// The path to the root directory of the SDK. | 13 /// The path to the root directory of the SDK. |
16 /// | 14 /// |
17 /// Note that if pub is running from source within the Dart repo (for example | 15 /// Note that if pub is running from source within the Dart repo (for example |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 var version = "$major.$minor.$patch"; | 65 var version = "$major.$minor.$patch"; |
68 if (channel == "be") { | 66 if (channel == "be") { |
69 // 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? |
70 version += "-edge"; | 68 version += "-edge"; |
71 } else if (channel == "dev") { | 69 } else if (channel == "dev") { |
72 version += "-dev.$prerelease.$prereleasePatch"; | 70 version += "-dev.$prerelease.$prereleasePatch"; |
73 } | 71 } |
74 | 72 |
75 return new Version.parse(version); | 73 return new Version.parse(version); |
76 } | 74 } |
OLD | NEW |