Skip to content

Commit ef975d4

Browse files
committed
chore(snap): Updated the Snapcraft build scripts.
1 parent a5154d2 commit ef975d4

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

snap/snapcraft.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@ parts:
4545
source: .
4646
plugin: flutter
4747
flutter-target: lib/main.dart
48+
override-build: |
49+
flutter pub get
50+
dart run open_authenticator:compile_svg
51+
dart run build_runner build --delete-conflicting-outputs
52+
dart run slang
53+
dart run open_authenticator:generate
54+
55+
if command -v craftctl >/dev/null 2>&1; then
56+
craftctl default
57+
elif command -v snapcraftctl >/dev/null 2>&1; then
58+
snapcraftctl build
59+
elif [ -x /usr/libexec/snapcraft/craftctl ]; then
60+
/usr/libexec/snapcraft/craftctl default
61+
elif [ -x /usr/libexec/snapcraft/snapcraftctl ]; then
62+
/usr/libexec/snapcraft/snapcraftctl build
63+
elif [ -x /usr/bin/scriptlet-bin/snapcraftctl ]; then
64+
/usr/bin/scriptlet-bin/snapcraftctl build
65+
else
66+
echo "Could not find craftctl or snapcraftctl." >&2
67+
exit 1
68+
fi
4869
build-packages:
4970
- default-jdk-headless
5071
- libcurl4-openssl-dev
@@ -77,4 +98,3 @@ parts:
7798
plugs:
7899
polkit:
79100
action-prefix: app.openauthenticator
80-

0 commit comments

Comments
 (0)