@siranjeevan/releaseflow 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +36 -25
- package/package.json +2 -2
- package/uploader.js +2 -2
package/index.js
CHANGED
|
@@ -269,32 +269,43 @@ async function runConfigureFlow() {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
function runPromptFlow() {
|
|
272
|
-
console.log('\n\x1b[36m--- 🚀
|
|
272
|
+
console.log('\n\x1b[36m--- 🚀 THE ULTIMATE ZERO-ERROR FLUTTER RELEASE GUIDE ---\x1b[0m');
|
|
273
273
|
|
|
274
|
-
console.log('\n\x1b[35m[1
|
|
275
|
-
console.log('
|
|
276
|
-
console.log('
|
|
277
|
-
console.log('
|
|
278
|
-
console.log('
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
console.log('
|
|
282
|
-
console.log('
|
|
283
|
-
console.log('
|
|
284
|
-
console.log('
|
|
285
|
-
console.log('
|
|
286
|
-
console.log('
|
|
287
|
-
|
|
288
|
-
console.log('
|
|
289
|
-
|
|
290
|
-
console.log('
|
|
291
|
-
console.log('
|
|
292
|
-
console.log('
|
|
293
|
-
|
|
294
|
-
console.log('
|
|
295
|
-
console.log('
|
|
296
|
-
|
|
297
|
-
console.log('
|
|
274
|
+
console.log('\n\x1b[35m[STEP 1] - ADD DEPENDENCIES\x1b[0m');
|
|
275
|
+
console.log('\x1b[33mAdd these to your pubspec.yaml and run flutter pub get:\x1b[0m');
|
|
276
|
+
console.log(' firebase_core: ^latest_version');
|
|
277
|
+
console.log(' cloud_firestore: ^latest_version');
|
|
278
|
+
console.log(' package_info_plus: ^latest_version');
|
|
279
|
+
console.log(' url_launcher: ^latest_version');
|
|
280
|
+
|
|
281
|
+
console.log('\n\x1b[35m[STEP 2] - CONFIGURE THE ENGINE (CRITICAL!)\x1b[0m');
|
|
282
|
+
console.log('\x1b[33m2A. In android/app/src/main/AndroidManifest.xml (Before </manifest>):\x1b[0m');
|
|
283
|
+
console.log(' <queries>');
|
|
284
|
+
console.log(' <intent><action android:name="android.intent.action.VIEW" /><data android:scheme="https" /></intent>');
|
|
285
|
+
console.log(' <intent><action android:name="android.intent.action.VIEW" /><data android:scheme="http" /></intent>');
|
|
286
|
+
console.log(' </queries>');
|
|
287
|
+
console.log('\x1b[33m2B. In lib/main.dart (Initialize first!):\x1b[0m');
|
|
288
|
+
console.log(' await Firebase.initializeApp(); // Add this line inside main()');
|
|
289
|
+
|
|
290
|
+
console.log('\n\x1b[35m[STEP 3] - THE DART LOGIC (STRICT VERSION CHECK)\x1b[0m');
|
|
291
|
+
console.log('\x1b[33mCreate remote_config_service.dart and compare versions:\x1b[0m');
|
|
292
|
+
console.log(' final doc = await FirebaseFirestore.instance.collection("app_config").doc("version").get();');
|
|
293
|
+
console.log(' final String latest = doc["latest_version"];');
|
|
294
|
+
console.log(' final bool force = doc["force_update"];');
|
|
295
|
+
console.log(' return (latest != currentVersion) && force;');
|
|
296
|
+
|
|
297
|
+
console.log('\n\x1b[35m[STEP 4] - THE FORCE UPDATE SCREEN\x1b[0m');
|
|
298
|
+
console.log('\x1b[33mCreate force_update_screen.dart with an "UPDATE NOW" button:\x1b[0m');
|
|
299
|
+
console.log(' final url = doc["download_url"];');
|
|
300
|
+
console.log(' if (await canLaunchUrl(Uri.parse(url))) {');
|
|
301
|
+
console.log(' await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);');
|
|
302
|
+
console.log(' }');
|
|
303
|
+
|
|
304
|
+
console.log('\n\x1b[35m[STEP 5] - INTEGRATION IN SPLASH SCREEN\x1b[0m');
|
|
305
|
+
console.log('\x1b[33mIn splash_screen.dart, check the logic then navigate:\x1b[0m');
|
|
306
|
+
console.log(' if (required) { Navigator.push(context, MaterialPageRoute(builder: (_) => ForceUpdateScreen())); }');
|
|
307
|
+
|
|
308
|
+
console.log('\n\x1b[32m--- 🏁 READY? RUN: releaseflow release ---\x1b[0m\n');
|
|
298
309
|
}
|
|
299
310
|
|
|
300
311
|
async function runRemoveConfig() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siranjeevan/releaseflow",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Automated Flutter Release Manager",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"firebase",
|
|
16
16
|
"automation"
|
|
17
17
|
],
|
|
18
|
-
"author": "
|
|
18
|
+
"author": "Siranjeevan",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"axios": "^1.7.9",
|
package/uploader.js
CHANGED
|
@@ -60,7 +60,7 @@ async function uploadApk(apkPath, version) {
|
|
|
60
60
|
action: 'read',
|
|
61
61
|
expires: '03-01-2099',
|
|
62
62
|
promptSaveAs: true,
|
|
63
|
-
responseDisposition:
|
|
63
|
+
responseDisposition: `attachment; filename="app-v${version}.apk"`
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
return url;
|
|
@@ -113,7 +113,7 @@ async function rollbackToVersion(version, forceUpdate) {
|
|
|
113
113
|
action: 'read',
|
|
114
114
|
expires: '03-01-2099',
|
|
115
115
|
promptSaveAs: true,
|
|
116
|
-
responseDisposition:
|
|
116
|
+
responseDisposition: `attachment; filename="app-v${version}.apk"`
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const configRef = db.collection('app_config').doc('version');
|