We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb12781 commit 148185eCopy full SHA for 148185e
scripts/dart_publish.sh
@@ -0,0 +1,35 @@
1
+#!/bin/bash
2
+
3
+# if the `dart` folder is not in the current path, try to move to the parent folder
4
+if [ ! -d "dart" ]; then
5
+ cd ..
6
+fi
7
8
+# if the `dart` folder is not in the current path, exit
9
10
+ echo "Could not find the 'dart' folder"
11
+ exit 1
12
13
14
+# enter the `dart` folder
15
+cd dart
16
17
+dart analyze
18
19
+# if analysis fails, exit
20
+if [ $? -ne 0 ]; then
21
+ echo "Please check the analysis errors"
22
23
24
25
+# publish in dry-run
26
+dart pub publish --dry-run
27
28
+# if dry-run fails, exit
29
30
+ echo "Please check the dry-run errors"
31
32
33
34
+# If we get here, everything is fine, so publish
35
+dart pub publish
0 commit comments