Skip to content

Commit 889ebd6

Browse files
committed
Modifying mock firebase_options.dart for CI compilation fix, cat / EOF technique
1 parent 0401a22 commit 889ebd6

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

.github/workflows/main.yaml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,29 @@ jobs:
2424
echo "const chirpToken = 'a';" >> lib/secrets.dart
2525
echo "const alphaVantageAccessKey = 'a';" >> lib/secrets.dart
2626
echo "const tavilyApiKey = 'a';" >> lib/secrets.dart
27-
echo "// ignore_for_file: type=lint" >> lib/firebase_options.dart
28-
echo "import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;" >> lib/firebase_options.dart
29-
echo "import 'package:flutter/foundation.dart'" >> lib/firebase_options.dart
30-
echo " show defaultTargetPlatform, TargetPlatform;" >> lib/firebase_options.dart
31-
echo "" >> lib/firebase_options.dart
32-
echo "class DefaultFirebaseOptions {" >> lib/firebase_options.dart
33-
echo " static FirebaseOptions get currentPlatform {" >> lib/firebase_options.dart
34-
echo " if (defaultTargetPlatform == TargetPlatform.android)" >> lib/firebase_options.dart
35-
echo " return android;" >> lib/firebase_options.dart
36-
echo " throw UnsupportedError('');" >> lib/firebase_options.dart
37-
echo " }" >> lib/firebase_options.dart
38-
echo "" >> lib/firebase_options.dart
39-
echo " static const FirebaseOptions android = FirebaseOptions(" >> lib/firebase_options.dart
40-
echo " apiKey: ''," >> lib/firebase_options.dart
41-
echo " appId: ''," >> lib/firebase_options.dart
42-
echo " messagingSenderId: ''," >> lib/firebase_options.dart
43-
echo " projectId: ''," >> lib/firebase_options.dart
44-
echo " storageBucket: ''," >> lib/firebase_options.dart
45-
echo " );" >> lib/firebase_options.dart
46-
echo "}" >> lib/firebase_options.dart
27+
cat <<EOF > lib/firebase_options.json
28+
// ignore_for_file: type=lint
29+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
30+
import 'package:flutter/foundation.dart'
31+
show defaultTargetPlatform, TargetPlatform;
32+
33+
class DefaultFirebaseOptions {
34+
static FirebaseOptions get currentPlatform {
35+
if (defaultTargetPlatform == TargetPlatform.android) {
36+
return android;
37+
}
38+
throw UnsupportedError('');
39+
}
40+
41+
static const FirebaseOptions android = FirebaseOptions(
42+
apiKey: '',
43+
appId: '',
44+
messagingSenderId: '',
45+
projectId: '',
46+
storageBucket: '',
47+
);
48+
}
49+
EOF
4750
4851
spell-check:
4952
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1

0 commit comments

Comments
 (0)