From fa946c5ce3e834c98c53a61ee65c3cd83cf8a551 Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Sat, 24 Dec 2022 19:01:37 +0300 Subject: [PATCH 1/2] fix: use default location of Flutter's '.pub_cache' folder (#79) --- lib/src/util.dart | 4 +--- test/remote_test.dart | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/util.dart b/lib/src/util.dart index 368f84c..be4a017 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -74,9 +74,7 @@ String? _resolveLibPath(String name) { // If lib is in Flutter's '.pub_cache' folder. final env = Platform.environment; if (env.containsKey('FLUTTER_ROOT')) { - final flutterPubCache = - PubCache(Directory(path.join(env['FLUTTER_ROOT']!, '.pub-cache'))); - libPath = checkCache(flutterPubCache); + libPath = checkCache(PubCache()); if (_doesFileExist(libPath)) return libPath; } diff --git a/test/remote_test.dart b/test/remote_test.dart index 126f317..caa3a63 100644 --- a/test/remote_test.dart +++ b/test/remote_test.dart @@ -278,7 +278,7 @@ void main() { expect(refs.first.localId, null); expect(refs.first.name, 'HEAD'); expect(refs.first.symRef, 'refs/heads/master'); - expect((refs.first.oid).sha, '49322bb17d3acc9146f98c97d078513228bbf3c0'); + expect(refs.first.oid.sha, '49322bb17d3acc9146f98c97d078513228bbf3c0'); expect(refs.first.toString(), contains('RemoteReference{')); expect(refs.first, remote.ls().first); }); From 675872c3eff279e66f7c21b75c762d224ae78250 Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Sat, 24 Dec 2022 19:09:16 +0300 Subject: [PATCH 2/2] chore: v1.2.1 --- CHANGELOG.md | 10 ++++++++++ macos/libgit2dart.podspec | 2 +- pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b639e..4606182 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.2.1 + +- fix: use default location of Flutter's '.pub_cache' folder + +- docs: update README with troubleshooting instructions for Windows + +- chore: bump minimum dart and flutter versions + +- chore: Lookup library in system path (thanks @dnys1) + ## 1.2.0 - feat: upgrade libgit2 to 1.5.0 diff --git a/macos/libgit2dart.podspec b/macos/libgit2dart.podspec index c9c9408..e2f4a77 100644 --- a/macos/libgit2dart.podspec +++ b/macos/libgit2dart.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'libgit2dart' - s.version = '1.2.0' + s.version = '1.2.1' s.summary = 'Dart bindings to libgit2.' s.description = <<-DESC Dart bindings to libgit2. diff --git a/pubspec.yaml b/pubspec.yaml index 5acda72..1663ddc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: libgit2dart description: Dart bindings to libgit2, provides ability to use libgit2 library in Dart and Flutter. -version: 1.2.0 +version: 1.2.1 homepage: https://github.com/SkinnyMind/libgit2dart