| Index: tools/release/version.dart
|
| diff --git a/tools/release/version.dart b/tools/release/version.dart
|
| index 7774e47553eb3a2f5f0e41edbba64c79c4035ca4..ecc96253f0690f3ca5c33f014086b5fbd8a8de4e 100644
|
| --- a/tools/release/version.dart
|
| +++ b/tools/release/version.dart
|
| @@ -178,9 +178,20 @@ class Version {
|
| return username;
|
| }
|
|
|
| + bool isGitRepository() {
|
| + var currentPath = new Path.fromNative(new Directory.current().path);
|
| + while (!new Directory.fromPath(currentPath.append(".git")).existsSync()) {
|
| + currentPath = currentPath.directoryPath;
|
| + if (currentPath.toString() == "/") {
|
| + break;
|
| + }
|
| + }
|
| + return new Directory.fromPath(currentPath.append(".git")).existsSync();
|
| + }
|
| +
|
| RepositoryType get repositoryType {
|
| if (new Directory(".svn").existsSync()) return RepositoryType.SVN;
|
| - if (new Directory(".git").existsSync()) return RepositoryType.GIT;
|
| + if (isGitRepository()) return RepositoryType.GIT;
|
| return RepositoryType.UNKNOWN;
|
| }
|
| }
|
|
|