Chromium Code Reviews| Index: dart/sdk/lib/_internal/pub/lib/src/sdk.dart |
| diff --git a/dart/sdk/lib/_internal/pub/lib/src/sdk.dart b/dart/sdk/lib/_internal/pub/lib/src/sdk.dart |
| index c99f516a3a57077265bba483aa0854240612d470..5af6732f3786f2bb5424e43a106a0dae20b82203 100644 |
| --- a/dart/sdk/lib/_internal/pub/lib/src/sdk.dart |
| +++ b/dart/sdk/lib/_internal/pub/lib/src/sdk.dart |
| @@ -12,11 +12,6 @@ import 'package:path/path.dart' as path; |
| import 'io.dart'; |
| import 'version.dart'; |
| -/// Matches an Eclipse-style SDK version number. This is four dotted numbers |
| -/// (major, minor, patch, build) with an optional suffix attached to the build |
| -/// number. |
| -final _versionPattern = new RegExp(r'^(\d+)\.(\d+)\.(\d+)\.(\d+.*)$'); |
| - |
| /// Gets the path to the root directory of the SDK. |
| String get rootDirectory { |
| // Assume the Dart executable is always coming from the SDK. |
| @@ -35,24 +30,6 @@ bool get isBleedingEdge { |
| return version.major == 0 && version.minor == 1 && version.patch == 2; |
|
Bob Nystrom
2013/12/04 22:28:20
This will break now, too, right?
Now that the ble
kustermann
2013/12/05 09:27:27
I removed the code.
|
| } |
| -/// Parse an Eclipse-style version number using the SDK's versioning convention. |
| -Version parseVersion(String version) { |
| - // Given a version file like: 0.1.2.0_r17495 |
| - // We create a semver like: 0.1.2+0.r17495 |
| - var match = _versionPattern.firstMatch(version); |
| - if (match == null) { |
| - throw new FormatException("The Dart SDK's 'version' file was not in a " |
| - "format pub could recognize. Found: $version"); |
| - } |
| - |
| - // Semantic versions cannot use "_". |
| - var build = match[4].replaceAll('_', '.'); |
| - |
| - return new Version( |
| - int.parse(match[1]), int.parse(match[2]), int.parse(match[3]), |
| - build: build); |
| -} |
| - |
| /// Determine the SDK's version number. |
| Version _getVersion() { |
| // Some of the pub integration tests require an SDK version number, but the |
| @@ -64,5 +41,5 @@ Version _getVersion() { |
| // Read the "version" file. |
| var revisionPath = path.join(rootDirectory, "version"); |
| var version = readTextFile(revisionPath).trim(); |
| - return parseVersion(version); |
| + return new Version.parse(version); |
|
Bob Nystrom
2013/12/04 22:28:20
\o/
|
| } |