Skip to content

Commit 00a6039

Browse files
dnys1Dillon Nys
authored andcommitted
refactor(aft): Remove libgit2dart dependency (#3562)
* refactor(aft): Remove `libgit2dart` dependency * chore(repo): Remove `libgit2dart` submodule * ci: Remove `libgit2dart` patches * chore(repo): Remove `libgit2` references from READMEs
1 parent ffc624c commit 00a6039

23 files changed

+178
-200
lines changed

.github/workflows/aft.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@ jobs:
4040

4141
- name: Get Packages
4242
working-directory: packages/aft
43-
run: |
44-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
45-
( cd external/libgit2dart; git apply ../libgit2dart.patch )
46-
dart pub upgrade
47-
mkdir linux
48-
cp external/libgit2dart/linux/*.so linux
43+
run: dart pub upgrade
4944

5045
- name: Save Repo State
5146
working-directory: packages/aft

.github/workflows/dart_dart2js.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ jobs:
5454

5555
- name: Setup aft
5656
shell: bash # Run in bash regardless of platform
57-
run: |
58-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
59-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
60-
dart pub global activate -spath packages/aft
61-
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
57+
run: dart pub global activate -spath packages/aft
6258

6359
- name: Setup Firefox
6460
if: ${{ matrix.browser == 'firefox' }}

.github/workflows/dart_ddc.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ jobs:
5454

5555
- name: Setup aft
5656
shell: bash # Run in bash regardless of platform
57-
run: |
58-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
59-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
60-
dart pub global activate -spath packages/aft
61-
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
57+
run: dart pub global activate -spath packages/aft
6258

6359
- name: Setup Firefox
6460
if: ${{ matrix.browser == 'firefox' }}

.github/workflows/dart_native.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ jobs:
5454

5555
- name: Setup aft
5656
shell: bash # Run in bash regardless of platform
57-
run: |
58-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
59-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
60-
dart pub global activate -spath packages/aft
61-
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
57+
run: dart pub global activate -spath packages/aft
6258

6359
# This is needed to support running tests which depend on db_common.
6460
- name: Install SQLite

.github/workflows/dart_vm.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ jobs:
6666

6767
- name: Setup aft
6868
shell: bash # Run in bash regardless of platform
69-
run: |
70-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
71-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
72-
dart pub global activate -spath packages/aft
73-
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
69+
run: dart pub global activate -spath packages/aft
7470

7571
- name: Bootstrap
7672
id: bootstrap

.github/workflows/generate_workflows.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ jobs:
2525

2626
- name: Setup aft
2727
shell: bash # Run in bash regardless of platform
28-
run: |
29-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
30-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
31-
dart pub global activate -spath packages/aft
32-
( cd packages/aft/external/libgit2dart; git reset --hard HEAD )
28+
run: dart pub global activate -spath packages/aft
3329

3430
- name: Generate Workflows
3531
run: aft generate workflows --set-exit-if-changed

.github/workflows/smoke_test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939

4040
- name: Link Packages
4141
run: |
42-
# Patch libgit2dart (see https://github.com/dart-lang/pub/issues/3563)
43-
( cd packages/aft/external/libgit2dart; git apply ../libgit2dart.patch )
4442
dart pub global activate -spath packages/aft
4543
aft link
4644

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@
77
[submodule "packages/secure_storage/amplify_secure_storage_dart/external/libsecret"]
88
path = packages/secure_storage/amplify_secure_storage_dart/external/libsecret
99
url = https://github.com/GNOME/libsecret.git
10-
[submodule "packages/aft/external/libgit2dart"]
11-
path = packages/aft/external/libgit2dart
12-
url = https://github.com/SkinnyMind/libgit2dart.git

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ $ cd amplify-flutter
7979
Next setup Amplify Flutter Repo Tool (aft). This can be installed using the following:
8080

8181
```sh
82-
$ brew install libgit2
8382
$ dart pub global activate -spath packages/aft
8483
```
8584

packages/aft/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,13 @@ A full list of available commands and options can be found by running `aft --hel
2828

2929
## Development
3030

31-
When developing `aft`, some commands will require the `libgit2` library for interacting with the repo's commit history. This library can be installed with the following commands:
32-
33-
```sh
34-
# macOS
35-
$ brew install libgit2
36-
```
37-
38-
```sh
39-
# Linux
40-
$ sudo apt-get install libgit2-dev
41-
```
42-
4331
To activate and run the local `aft` package:
4432

4533
```sh
4634
$ dart pub global activate -spath packages/aft
4735
$ aft --help
4836
```
4937

50-
> Note: If you encounter a dependency error for libgit2dart, run `git submodule update --init`.
51-
5238
Make sure the Dart pub cache is in your PATH to run `aft` as a global executable after activating. See [here](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path) for more information.
5339

5440
### Writing Scripts

0 commit comments

Comments
 (0)