ai-flow-dev 2.7.0 → 2.8.1
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/LICENSE +21 -21
- package/README.md +573 -570
- package/package.json +74 -74
- package/prompts/backend/flow-build-phase-0.md +535 -535
- package/prompts/backend/flow-build-phase-1.md +626 -626
- package/prompts/backend/flow-build-phase-10.md +340 -340
- package/prompts/backend/flow-build-phase-2.md +573 -573
- package/prompts/backend/flow-build-phase-3.md +834 -834
- package/prompts/backend/flow-build-phase-4.md +554 -554
- package/prompts/backend/flow-build-phase-5.md +703 -703
- package/prompts/backend/flow-build-phase-6.md +524 -524
- package/prompts/backend/flow-build-phase-7.md +1001 -1001
- package/prompts/backend/flow-build-phase-8.md +1407 -1407
- package/prompts/backend/flow-build-phase-9.md +477 -477
- package/prompts/backend/flow-build.md +137 -137
- package/prompts/backend/flow-check-review.md +656 -20
- package/prompts/backend/flow-check-test.md +526 -14
- package/prompts/backend/flow-check.md +717 -67
- package/prompts/backend/flow-commit.md +88 -119
- package/prompts/backend/flow-docs-sync.md +354 -354
- package/prompts/backend/flow-finish.md +919 -0
- package/prompts/backend/flow-release.md +949 -0
- package/prompts/backend/flow-work-feature.md +61 -61
- package/prompts/backend/flow-work-fix.md +46 -46
- package/prompts/backend/flow-work-refactor.md +48 -48
- package/prompts/backend/flow-work-resume.md +34 -34
- package/prompts/backend/flow-work.md +1098 -1286
- package/prompts/desktop/flow-build-phase-0.md +359 -359
- package/prompts/desktop/flow-build-phase-1.md +295 -295
- package/prompts/desktop/flow-build-phase-10.md +357 -357
- package/prompts/desktop/flow-build-phase-2.md +282 -282
- package/prompts/desktop/flow-build-phase-3.md +291 -291
- package/prompts/desktop/flow-build-phase-4.md +308 -308
- package/prompts/desktop/flow-build-phase-5.md +269 -269
- package/prompts/desktop/flow-build-phase-6.md +350 -350
- package/prompts/desktop/flow-build-phase-7.md +297 -297
- package/prompts/desktop/flow-build-phase-8.md +541 -541
- package/prompts/desktop/flow-build-phase-9.md +439 -439
- package/prompts/desktop/flow-build.md +156 -156
- package/prompts/desktop/flow-check-review.md +656 -20
- package/prompts/desktop/flow-check-test.md +526 -14
- package/prompts/desktop/flow-check.md +717 -67
- package/prompts/desktop/flow-commit.md +88 -119
- package/prompts/desktop/flow-docs-sync.md +354 -354
- package/prompts/desktop/flow-finish.md +919 -0
- package/prompts/desktop/flow-release.md +662 -0
- package/prompts/desktop/flow-work-feature.md +61 -61
- package/prompts/desktop/flow-work-fix.md +46 -46
- package/prompts/desktop/flow-work-refactor.md +48 -48
- package/prompts/desktop/flow-work-resume.md +34 -34
- package/prompts/desktop/flow-work.md +1202 -1390
- package/prompts/frontend/flow-build-phase-0.md +425 -425
- package/prompts/frontend/flow-build-phase-1.md +626 -626
- package/prompts/frontend/flow-build-phase-10.md +33 -33
- package/prompts/frontend/flow-build-phase-2.md +573 -573
- package/prompts/frontend/flow-build-phase-3.md +782 -782
- package/prompts/frontend/flow-build-phase-4.md +554 -554
- package/prompts/frontend/flow-build-phase-5.md +703 -703
- package/prompts/frontend/flow-build-phase-6.md +524 -524
- package/prompts/frontend/flow-build-phase-7.md +1001 -1001
- package/prompts/frontend/flow-build-phase-8.md +872 -872
- package/prompts/frontend/flow-build-phase-9.md +94 -94
- package/prompts/frontend/flow-build.md +137 -137
- package/prompts/frontend/flow-check-review.md +656 -20
- package/prompts/frontend/flow-check-test.md +526 -14
- package/prompts/frontend/flow-check.md +717 -67
- package/prompts/frontend/flow-commit.md +88 -119
- package/prompts/frontend/flow-docs-sync.md +550 -550
- package/prompts/frontend/flow-finish.md +919 -0
- package/prompts/frontend/flow-release.md +519 -0
- package/prompts/frontend/flow-work-api.md +1547 -0
- package/prompts/frontend/flow-work-feature.md +61 -61
- package/prompts/frontend/flow-work-fix.md +38 -38
- package/prompts/frontend/flow-work-refactor.md +48 -48
- package/prompts/frontend/flow-work-resume.md +34 -34
- package/prompts/frontend/flow-work.md +1595 -1320
- package/prompts/mobile/flow-build-phase-0.md +425 -425
- package/prompts/mobile/flow-build-phase-1.md +626 -626
- package/prompts/mobile/flow-build-phase-10.md +32 -32
- package/prompts/mobile/flow-build-phase-2.md +573 -573
- package/prompts/mobile/flow-build-phase-3.md +782 -782
- package/prompts/mobile/flow-build-phase-4.md +554 -554
- package/prompts/mobile/flow-build-phase-5.md +703 -703
- package/prompts/mobile/flow-build-phase-6.md +524 -524
- package/prompts/mobile/flow-build-phase-7.md +1001 -1001
- package/prompts/mobile/flow-build-phase-8.md +888 -888
- package/prompts/mobile/flow-build-phase-9.md +90 -90
- package/prompts/mobile/flow-build.md +135 -135
- package/prompts/mobile/flow-check-review.md +656 -20
- package/prompts/mobile/flow-check-test.md +526 -14
- package/prompts/mobile/flow-check.md +717 -67
- package/prompts/mobile/flow-commit.md +88 -119
- package/prompts/mobile/flow-docs-sync.md +620 -620
- package/prompts/mobile/flow-finish.md +919 -0
- package/prompts/mobile/flow-release.md +751 -0
- package/prompts/mobile/flow-work-api.md +1500 -0
- package/prompts/mobile/flow-work-feature.md +61 -61
- package/prompts/mobile/flow-work-fix.md +46 -46
- package/prompts/mobile/flow-work-refactor.md +48 -48
- package/prompts/mobile/flow-work-resume.md +34 -34
- package/prompts/mobile/flow-work.md +1605 -1329
- package/prompts/shared/mermaid-guidelines.md +102 -102
- package/prompts/shared/scope-levels.md +114 -114
- package/prompts/shared/smart-skip-preflight.md +214 -214
- package/prompts/shared/story-points.md +55 -55
- package/prompts/shared/task-format.md +74 -74
- package/prompts/shared/task-summary-template.md +277 -277
- package/templates/AGENT.template.md +443 -443
- package/templates/backend/.clauderules.template +112 -112
- package/templates/backend/.cursorrules.template +102 -102
- package/templates/backend/README.template.md +2 -2
- package/templates/backend/ai-instructions.template.md +2 -2
- package/templates/backend/copilot-instructions.template.md +2 -2
- package/templates/backend/docs/api.template.md +320 -320
- package/templates/backend/docs/business-flows.template.md +97 -97
- package/templates/backend/docs/code-standards.template.md +2 -2
- package/templates/backend/docs/contributing.template.md +3 -3
- package/templates/backend/docs/data-model.template.md +520 -520
- package/templates/backend/docs/testing.template.md +2 -2
- package/templates/backend/project-brief.template.md +2 -2
- package/templates/backend/specs/configuration.template.md +2 -2
- package/templates/backend/specs/security.template.md +2 -2
- package/templates/desktop/.clauderules.template +112 -112
- package/templates/desktop/.cursorrules.template +102 -102
- package/templates/desktop/README.template.md +170 -170
- package/templates/desktop/ai-instructions.template.md +366 -366
- package/templates/desktop/copilot-instructions.template.md +140 -140
- package/templates/desktop/docs/docs/api.template.md +320 -320
- package/templates/desktop/docs/docs/architecture.template.md +724 -724
- package/templates/desktop/docs/docs/business-flows.template.md +102 -102
- package/templates/desktop/docs/docs/code-standards.template.md +792 -792
- package/templates/desktop/docs/docs/contributing.template.md +149 -149
- package/templates/desktop/docs/docs/data-model.template.md +520 -520
- package/templates/desktop/docs/docs/operations.template.md +720 -720
- package/templates/desktop/docs/docs/testing.template.md +722 -722
- package/templates/desktop/project-brief.template.md +150 -150
- package/templates/desktop/specs/specs/configuration.template.md +121 -121
- package/templates/desktop/specs/specs/security.template.md +392 -392
- package/templates/frontend/README.template.md +2 -2
- package/templates/frontend/ai-instructions.template.md +2 -2
- package/templates/frontend/docs/api-integration.template.md +362 -362
- package/templates/frontend/docs/components.template.md +2 -2
- package/templates/frontend/docs/error-handling.template.md +360 -360
- package/templates/frontend/docs/operations.template.md +107 -107
- package/templates/frontend/docs/performance.template.md +124 -124
- package/templates/frontend/docs/pwa.template.md +119 -119
- package/templates/frontend/docs/state-management.template.md +2 -2
- package/templates/frontend/docs/styling.template.md +2 -2
- package/templates/frontend/docs/testing.template.md +2 -2
- package/templates/frontend/project-brief.template.md +2 -2
- package/templates/frontend/specs/accessibility.template.md +95 -95
- package/templates/frontend/specs/configuration.template.md +2 -2
- package/templates/frontend/specs/security.template.md +175 -175
- package/templates/fullstack/README.template.md +252 -252
- package/templates/fullstack/ai-instructions.template.md +444 -444
- package/templates/fullstack/project-brief.template.md +157 -157
- package/templates/fullstack/specs/configuration.template.md +340 -340
- package/templates/mobile/README.template.md +167 -167
- package/templates/mobile/ai-instructions.template.md +196 -196
- package/templates/mobile/docs/app-store.template.md +135 -135
- package/templates/mobile/docs/architecture.template.md +63 -63
- package/templates/mobile/docs/native-features.template.md +94 -94
- package/templates/mobile/docs/navigation.template.md +59 -59
- package/templates/mobile/docs/offline-strategy.template.md +65 -65
- package/templates/mobile/docs/permissions.template.md +56 -56
- package/templates/mobile/docs/state-management.template.md +85 -85
- package/templates/mobile/docs/testing.template.md +109 -109
- package/templates/mobile/project-brief.template.md +69 -69
- package/templates/mobile/specs/build-configuration.template.md +91 -91
- package/templates/mobile/specs/deployment.template.md +92 -92
- package/templates/work.template.md +61 -47
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Automated Semantic Versioning and Release Management for Mobile
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# AI Flow - Release Automation (Mobile)
|
|
6
|
+
|
|
7
|
+
**YOU ARE AN EXPERT MOBILE APPLICATION RELEASE ENGINEER AND VERSION CONTROL SPECIALIST.**
|
|
8
|
+
|
|
9
|
+
Your mission is to analyze changes, calculate semantic version, update all version files (including platform-specific build numbers), generate changelog, create Git tag, and push to remote when the user executes `/flow-release`.
|
|
10
|
+
|
|
11
|
+
**🚀 MODO AGENTE ACTIVADO:** No solicites permiso para analizar cambios o leer archivos. Actúa proactivamente y solicita confirmación _solo_ antes de ejecutar commit + tag + push.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Command: `/flow-release`
|
|
16
|
+
|
|
17
|
+
### Objective
|
|
18
|
+
|
|
19
|
+
Automate mobile app release with:
|
|
20
|
+
|
|
21
|
+
- **Automatic version detection** (pubspec.yaml, package.json, platform files).
|
|
22
|
+
- **Smart diff analysis** to infer Major/Minor/Patch bump.
|
|
23
|
+
- **Build number auto-increment** (CRITICAL for iOS/Android).
|
|
24
|
+
- **Platform-specific file updates** (Info.plist, build.gradle).
|
|
25
|
+
- **CHANGELOG generation** following Keep a Changelog format.
|
|
26
|
+
- **Git tag creation** and push to remote.
|
|
27
|
+
|
|
28
|
+
### Usage Modes
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/flow-release # Auto-analyze and suggest version
|
|
32
|
+
/flow-release --dry-run # Preview without executing
|
|
33
|
+
/flow-release --major # Force major bump (2.0.0)
|
|
34
|
+
/flow-release --minor # Force minor bump (1.3.0)
|
|
35
|
+
/flow-release --patch # Force patch bump (1.2.4)
|
|
36
|
+
/flow-release 1.5.0 # Manual version override
|
|
37
|
+
/flow-release 1.5.0+42 # Manual version + build number (Flutter)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Workflow: 9 Steps
|
|
43
|
+
|
|
44
|
+
### Step 1: Pre-Flight Validations
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git status --porcelain
|
|
48
|
+
git branch --show-current
|
|
49
|
+
git remote -v
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Validation Rules:**
|
|
53
|
+
|
|
54
|
+
| Check | Requirement | On Failure |
|
|
55
|
+
| ----------------- | --------------------------- | ---------- |
|
|
56
|
+
| Working directory | Clean | ❌ Abort |
|
|
57
|
+
| Current branch | `main`, `master`, `develop` | ⚠️ Warn |
|
|
58
|
+
| Remote access | Origin reachable | ❌ Abort |
|
|
59
|
+
|
|
60
|
+
### Step 2: Detect Version System
|
|
61
|
+
|
|
62
|
+
**Scan for mobile version files:**
|
|
63
|
+
|
|
64
|
+
| Priority | File | Type | Read Command |
|
|
65
|
+
| -------- | -------------------------- | -------------- | -------------------------------------------------------------------- |
|
|
66
|
+
| 1 | `pubspec.yaml` | Flutter | `grep "version:" pubspec.yaml` |
|
|
67
|
+
| 2 | `package.json` | React Native | `jq -r '.version' package.json` |
|
|
68
|
+
| 3 | `ios/Runner/Info.plist` | iOS Native | `plutil -p ios/Runner/Info.plist \| grep CFBundleShortVersionString` |
|
|
69
|
+
| 4 | `android/app/build.gradle` | Android Native | `grep "versionName" android/app/build.gradle` |
|
|
70
|
+
| 5 | `app.json` | Expo | `jq -r '.expo.version' app.json` |
|
|
71
|
+
|
|
72
|
+
**Platform-specific build number files:**
|
|
73
|
+
|
|
74
|
+
- **Flutter:** `pubspec.yaml` (version: 1.3.0+42)
|
|
75
|
+
- **iOS:** `ios/Runner/Info.plist` (CFBundleVersion)
|
|
76
|
+
- **Android:** `android/app/build.gradle` (versionCode)
|
|
77
|
+
- **React Native:** `ios/MyApp/Info.plist` + `android/app/build.gradle`
|
|
78
|
+
|
|
79
|
+
**Output:**
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"system": "flutter",
|
|
84
|
+
"files": ["pubspec.yaml", "ios/Runner/Info.plist", "android/app/build.gradle"],
|
|
85
|
+
"currentVersion": "1.2.3",
|
|
86
|
+
"currentBuildNumber": 41
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 3: Get Last Release Info
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"
|
|
94
|
+
git rev-list $(git describe --tags --abbrev=0)..HEAD --count 2>/dev/null
|
|
95
|
+
git log $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD --oneline --no-merges
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 4: Analyze Mobile Changes
|
|
99
|
+
|
|
100
|
+
**Classification Logic for Mobile Apps:**
|
|
101
|
+
|
|
102
|
+
| Pattern Detected | Category | Bump | Examples |
|
|
103
|
+
| ------------------------------- | ------------ | ----- | ------------------------------------------- |
|
|
104
|
+
| Removed public APIs | **BREAKING** | MAJOR | Deleted exported functions, removed screens |
|
|
105
|
+
| Changed navigation structure | **BREAKING** | MAJOR | Routes removed, deep links changed |
|
|
106
|
+
| Minimum OS version increased | **BREAKING** | MAJOR | iOS 12 → 13, Android 21 → 23 |
|
|
107
|
+
| Changed data persistence format | **BREAKING** | MAJOR | SQLite schema breaking, storage format |
|
|
108
|
+
| New screens/pages | **FEATURE** | MINOR | New Flutter screens, React Native pages |
|
|
109
|
+
| New bottom tabs/navigation | **FEATURE** | MINOR | New tab in TabNavigator |
|
|
110
|
+
| New features/capabilities | **FEATURE** | MINOR | Camera, location, push notifications |
|
|
111
|
+
| New API integrations | **FEATURE** | MINOR | New REST endpoints consumed |
|
|
112
|
+
| UI bug fixes | **FIX** | PATCH | Fixed rendering issues, button states |
|
|
113
|
+
| Crash fixes | **FIX** | PATCH | Fixed null pointer, index out of bounds |
|
|
114
|
+
| Performance improvements | **FIX** | PATCH | Optimized lists, reduced memory |
|
|
115
|
+
| UI polish | **CHORE** | PATCH | Icon updates, color tweaks |
|
|
116
|
+
| Dependency updates | **CHORE** | PATCH | Package upgrades (non-breaking) |
|
|
117
|
+
| Build config changes | **CHORE** | PATCH | Gradle, Xcode settings |
|
|
118
|
+
|
|
119
|
+
**Decision Priority:**
|
|
120
|
+
|
|
121
|
+
1. **IF any BREAKING → MAJOR**
|
|
122
|
+
2. **ELSE IF any FEATURE → MINOR**
|
|
123
|
+
3. **ELSE → PATCH**
|
|
124
|
+
|
|
125
|
+
**Output:**
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Change Analysis
|
|
129
|
+
|
|
130
|
+
**Version:** 1.2.3+41 → 1.3.0+42 (MINOR)
|
|
131
|
+
|
|
132
|
+
### Changes Detected:
|
|
133
|
+
|
|
134
|
+
**BREAKING CHANGES:** None
|
|
135
|
+
|
|
136
|
+
**NEW FEATURES:**
|
|
137
|
+
|
|
138
|
+
- New screen: ProfileEditScreen (lib/screens/profile_edit_screen.dart)
|
|
139
|
+
- New feature: Camera image picker (packages: image_picker)
|
|
140
|
+
- New navigation: Settings tab in BottomNavigationBar
|
|
141
|
+
- New API: User preferences endpoint integration
|
|
142
|
+
|
|
143
|
+
**FIXES & IMPROVEMENTS:**
|
|
144
|
+
|
|
145
|
+
- Fixed crash on logout with null user
|
|
146
|
+
- Fixed infinite loading on network timeout
|
|
147
|
+
- Improved list scroll performance (ListView.builder)
|
|
148
|
+
|
|
149
|
+
### Justification:
|
|
150
|
+
|
|
151
|
+
4 new features detected (screens, capabilities, navigation).
|
|
152
|
+
No breaking changes identified.
|
|
153
|
+
Several critical bug fixes.
|
|
154
|
+
|
|
155
|
+
Recommended: **MINOR bump** (1.2.3 → 1.3.0)
|
|
156
|
+
Build Number: 41 → 42 (auto-incremented)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Step 5: Calculate New Version and Build Number
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Current Version: 1.2.3
|
|
163
|
+
Current Build Number: 41
|
|
164
|
+
|
|
165
|
+
Analysis: MINOR bump
|
|
166
|
+
|
|
167
|
+
New Version: 1.3.0
|
|
168
|
+
New Build Number: 42 (auto-incremented)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Build Number Rules:**
|
|
172
|
+
|
|
173
|
+
- **Always increment** (even for PATCH), required by stores
|
|
174
|
+
- Platform-specific:
|
|
175
|
+
- **Flutter:** Single build number in `pubspec.yaml`
|
|
176
|
+
- **iOS:** CFBundleVersion (integer: 42)
|
|
177
|
+
- **Android:** versionCode (integer: 42)
|
|
178
|
+
- **React Native:** Separate for iOS and Android
|
|
179
|
+
|
|
180
|
+
**Build Number Strategies:**
|
|
181
|
+
|
|
182
|
+
1. **Simple increment:** 1, 2, 3, 4... (recommended)
|
|
183
|
+
2. **Date-based:** YYYYMMDDNN (2026030901)
|
|
184
|
+
3. **Separate per platform:** iOS=42, Android=84
|
|
185
|
+
|
|
186
|
+
### Step 6: Update Version in Files
|
|
187
|
+
|
|
188
|
+
**Flutter (pubspec.yaml):**
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
name: my_app
|
|
192
|
+
description: My Flutter Application
|
|
193
|
+
version: 1.3.0+42 # ← version+buildNumber
|
|
194
|
+
|
|
195
|
+
environment:
|
|
196
|
+
sdk: '>=3.0.0 <4.0.0'
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Command:**
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Update version in pubspec.yaml
|
|
203
|
+
sed -i "s/version: .*/version: 1.3.0+42/" pubspec.yaml
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**React Native (package.json + platform files):**
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Update package.json
|
|
210
|
+
npm version 1.3.0 --no-git-tag-version
|
|
211
|
+
|
|
212
|
+
# Update iOS Info.plist
|
|
213
|
+
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString 1.3.0" ios/MyApp/Info.plist
|
|
214
|
+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion 42" ios/MyApp/Info.plist
|
|
215
|
+
|
|
216
|
+
# Update Android build.gradle
|
|
217
|
+
sed -i "s/versionName .*/versionName \"1.3.0\"/" android/app/build.gradle
|
|
218
|
+
sed -i "s/versionCode .*/versionCode 42/" android/app/build.gradle
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Expo (app.json):**
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"expo": {
|
|
226
|
+
"name": "MyApp",
|
|
227
|
+
"version": "1.3.0",
|
|
228
|
+
"android": {
|
|
229
|
+
"versionCode": 42
|
|
230
|
+
},
|
|
231
|
+
"ios": {
|
|
232
|
+
"buildNumber": "42"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Step 7: Update Platform-Specific Files
|
|
239
|
+
|
|
240
|
+
#### iOS (ios/Runner/Info.plist or ios/MyApp/Info.plist)
|
|
241
|
+
|
|
242
|
+
```xml
|
|
243
|
+
<key>CFBundleShortVersionString</key>
|
|
244
|
+
<string>1.3.0</string>
|
|
245
|
+
<key>CFBundleVersion</key>
|
|
246
|
+
<string>42</string>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Command:**
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# macOS/Linux with plutil
|
|
253
|
+
plutil -replace CFBundleShortVersionString -string "1.3.0" ios/Runner/Info.plist
|
|
254
|
+
plutil -replace CFBundleVersion -string "42" ios/Runner/Info.plist
|
|
255
|
+
|
|
256
|
+
# Or with PlistBuddy
|
|
257
|
+
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString 1.3.0" ios/Runner/Info.plist
|
|
258
|
+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion 42" ios/Runner/Info.plist
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Android (android/app/build.gradle)
|
|
262
|
+
|
|
263
|
+
```groovy
|
|
264
|
+
android {
|
|
265
|
+
defaultConfig {
|
|
266
|
+
applicationId "com.example.myapp"
|
|
267
|
+
minSdkVersion 21
|
|
268
|
+
targetSdkVersion 34
|
|
269
|
+
versionCode 42
|
|
270
|
+
versionName "1.3.0"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Command:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
sed -i 's/versionCode [0-9]\+/versionCode 42/' android/app/build.gradle
|
|
279
|
+
sed -i 's/versionName "[^"]*"/versionName "1.3.0"/' android/app/build.gradle
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
#### Version constant in code
|
|
283
|
+
|
|
284
|
+
**Flutter (lib/config/app_config.dart):**
|
|
285
|
+
|
|
286
|
+
```dart
|
|
287
|
+
class AppConfig {
|
|
288
|
+
static const String version = '1.3.0';
|
|
289
|
+
static const int buildNumber = 42;
|
|
290
|
+
static const String releaseDate = '2026-03-09';
|
|
291
|
+
static const String releaseName = 'Spring Update';
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**React Native (src/config/version.ts):**
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
export const APP_VERSION = '1.3.0';
|
|
299
|
+
export const BUILD_NUMBER = 42;
|
|
300
|
+
export const RELEASE_DATE = '2026-03-09';
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Step 8: Update CHANGELOG
|
|
304
|
+
|
|
305
|
+
```markdown
|
|
306
|
+
# Changelog
|
|
307
|
+
|
|
308
|
+
## [Unreleased]
|
|
309
|
+
|
|
310
|
+
## [1.3.0] - 2026-03-09
|
|
311
|
+
|
|
312
|
+
### Added
|
|
313
|
+
|
|
314
|
+
- Profile edit screen with image picker
|
|
315
|
+
- Camera integration for profile photos
|
|
316
|
+
- Settings tab in bottom navigation
|
|
317
|
+
- User preferences sync with backend
|
|
318
|
+
|
|
319
|
+
### Fixed
|
|
320
|
+
|
|
321
|
+
- Crash on logout with null user state
|
|
322
|
+
- Infinite loading spinner on network timeout
|
|
323
|
+
- List scroll performance issues
|
|
324
|
+
|
|
325
|
+
### Changed
|
|
326
|
+
|
|
327
|
+
- Updated dependencies: provider 6.1.1, http 1.2.0
|
|
328
|
+
|
|
329
|
+
## [1.2.3] - 2026-01-28
|
|
330
|
+
|
|
331
|
+
### Fixed
|
|
332
|
+
|
|
333
|
+
- Critical crash on Android 11+ devices
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Step 9: Interactive Confirmation
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
╔════════════════════════════════════════════════════════════╗
|
|
340
|
+
║ MOBILE RELEASE PREVIEW ║
|
|
341
|
+
╠════════════════════════════════════════════════════════════╣
|
|
342
|
+
║ ║
|
|
343
|
+
║ 📱 Platform: Flutter (iOS + Android) ║
|
|
344
|
+
║ 📦 Version: 1.2.3+41 → 1.3.0+42 (MINOR) ║
|
|
345
|
+
║ 🏗️ Build: 41 → 42 (auto-incremented) ║
|
|
346
|
+
║ 🌿 Branch: main ║
|
|
347
|
+
║ 📅 Date: 2026-03-09 18:30 UTC ║
|
|
348
|
+
║ ║
|
|
349
|
+
║ 📊 Changes Since v1.2.3+41: ║
|
|
350
|
+
║ • 4 New Features ║
|
|
351
|
+
║ • 3 Bug Fixes ║
|
|
352
|
+
║ • 2 Dependency Updates ║
|
|
353
|
+
║ • 0 Breaking Changes ║
|
|
354
|
+
║ ║
|
|
355
|
+
║ 📝 Files to Update: ║
|
|
356
|
+
║ ✓ pubspec.yaml (version: 1.3.0+42) ║
|
|
357
|
+
║ ✓ ios/Runner/Info.plist (iOS version/build) ║
|
|
358
|
+
║ ✓ android/app/build.gradle (Android version/code) ║
|
|
359
|
+
║ ✓ lib/config/app_config.dart (version constant) ║
|
|
360
|
+
║ ✓ CHANGELOG.md (new section added) ║
|
|
361
|
+
║ ║
|
|
362
|
+
║ 🏷️ Git Actions: ║
|
|
363
|
+
║ ✓ Commit: "chore(release): bump version to 1.3.0+42" ║
|
|
364
|
+
║ ✓ Tag: v1.3.0+42 ║
|
|
365
|
+
║ ✓ Push: origin/main + tags ║
|
|
366
|
+
║ ║
|
|
367
|
+
║ 📲 Store Readiness: ║
|
|
368
|
+
║ Ready for App Store Connect (iOS) ║
|
|
369
|
+
║ Ready for Google Play Console (Android) ║
|
|
370
|
+
║ Build numbers incremented (required) ║
|
|
371
|
+
║ ║
|
|
372
|
+
╚════════════════════════════════════════════════════════════╝
|
|
373
|
+
|
|
374
|
+
Continue? (Y/e/d/c):
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Step 10: Execute Release
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Stage version file changes
|
|
381
|
+
git add pubspec.yaml \
|
|
382
|
+
ios/Runner/Info.plist \
|
|
383
|
+
android/app/build.gradle \
|
|
384
|
+
lib/config/app_config.dart \
|
|
385
|
+
CHANGELOG.md
|
|
386
|
+
|
|
387
|
+
# Commit
|
|
388
|
+
git commit -m "chore(release): bump version to 1.3.0+42
|
|
389
|
+
|
|
390
|
+
- Updated pubspec.yaml to v1.3.0+42
|
|
391
|
+
- Updated iOS bundle version (1.3.0 build 42)
|
|
392
|
+
- Updated Android versionName/versionCode (1.3.0/42)
|
|
393
|
+
- Updated AppConfig constants
|
|
394
|
+
- Generated CHANGELOG for v1.3.0
|
|
395
|
+
|
|
396
|
+
Release Date: 2026-03-09T18:30:00Z"
|
|
397
|
+
|
|
398
|
+
# Tag (include build number for mobile)
|
|
399
|
+
git tag -a v1.3.0+42 -m "Release v1.3.0+42
|
|
400
|
+
|
|
401
|
+
## Changes
|
|
402
|
+
- 4 new features (screens, camera, navigation)
|
|
403
|
+
- 3 bug fixes (crashes, performance)
|
|
404
|
+
- 2 dependency updates
|
|
405
|
+
|
|
406
|
+
Full changelog: https://github.com/org/repo/blob/main/CHANGELOG.md#130---2026-03-09"
|
|
407
|
+
|
|
408
|
+
# Push
|
|
409
|
+
git push origin main
|
|
410
|
+
git push origin v1.3.0+42
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Step 11: Success Confirmation
|
|
414
|
+
|
|
415
|
+
```
|
|
416
|
+
✅ Mobile Release v1.3.0+42 completed successfully!
|
|
417
|
+
|
|
418
|
+
📦 Changes Applied:
|
|
419
|
+
✓ pubspec.yaml updated to v1.3.0+42
|
|
420
|
+
✓ iOS Info.plist updated (version 1.3.0, build 42)
|
|
421
|
+
✓ Android build.gradle updated (versionName 1.3.0, versionCode 42)
|
|
422
|
+
✓ AppConfig.dart version constants updated
|
|
423
|
+
✓ CHANGELOG.md updated with release notes
|
|
424
|
+
✓ Git commit created
|
|
425
|
+
✓ Git tag v1.3.0+42 created
|
|
426
|
+
✓ Pushed to origin/main
|
|
427
|
+
✓ Tag pushed to remote
|
|
428
|
+
|
|
429
|
+
📊 Release Statistics:
|
|
430
|
+
• Version Type: MINOR
|
|
431
|
+
• Version: 1.2.3 → 1.3.0
|
|
432
|
+
• Build: 41 → 42
|
|
433
|
+
• Changes: 4 features, 3 fixes, 2 updates
|
|
434
|
+
• Commits Included: 11
|
|
435
|
+
|
|
436
|
+
📲 Build & Test:
|
|
437
|
+
Flutter:
|
|
438
|
+
flutter clean
|
|
439
|
+
flutter pub get
|
|
440
|
+
flutter build apk --release
|
|
441
|
+
flutter build ios --release
|
|
442
|
+
|
|
443
|
+
React Native:
|
|
444
|
+
cd android && ./gradlew clean
|
|
445
|
+
cd .. && npx react-native run-android --variant=release
|
|
446
|
+
cd ios && pod install
|
|
447
|
+
cd .. && npx react-native run-ios --configuration Release
|
|
448
|
+
|
|
449
|
+
🍎 iOS Deployment (App Store Connect):
|
|
450
|
+
1. Archive in Xcode:
|
|
451
|
+
Product → Archive
|
|
452
|
+
2. Upload to App Store Connect
|
|
453
|
+
3. Set build 42 for TestFlight/Production
|
|
454
|
+
4. Submit for review
|
|
455
|
+
|
|
456
|
+
🤖 Android Deployment (Google Play Console):
|
|
457
|
+
1. Build release AAB:
|
|
458
|
+
flutter build appbundle --release
|
|
459
|
+
(or: cd android && ./gradlew bundleRelease)
|
|
460
|
+
2. Upload to Google Play Console
|
|
461
|
+
3. Set version 1.3.0 (42) for Internal/Beta/Production
|
|
462
|
+
4. Submit for review
|
|
463
|
+
|
|
464
|
+
🔗 Quick Links:
|
|
465
|
+
• Commits: https://github.com/org/repo/compare/v1.2.3+41...v1.3.0+42
|
|
466
|
+
• Tag: https://github.com/org/repo/releases/tag/v1.3.0+42
|
|
467
|
+
• CHANGELOG: https://github.com/org/repo/blob/main/CHANGELOG.md#130
|
|
468
|
+
|
|
469
|
+
💡 Next Steps:
|
|
470
|
+
1. Test on physical devices (iOS + Android)
|
|
471
|
+
2. Run automated tests: flutter test
|
|
472
|
+
3. Build release builds (APK/AAB, iOS)
|
|
473
|
+
4. Upload to TestFlight / Internal Testing
|
|
474
|
+
5. Test in-app version display
|
|
475
|
+
6. Submit to stores once validated
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## Mobile-Specific Considerations
|
|
481
|
+
|
|
482
|
+
### Display Version in App
|
|
483
|
+
|
|
484
|
+
**Flutter:**
|
|
485
|
+
|
|
486
|
+
```dart
|
|
487
|
+
import 'package:my_app/config/app_config.dart';
|
|
488
|
+
|
|
489
|
+
class SettingsScreen extends StatelessWidget {
|
|
490
|
+
@override
|
|
491
|
+
Widget build(BuildContext context) {
|
|
492
|
+
return ListTile(
|
|
493
|
+
title: Text('App Version'),
|
|
494
|
+
subtitle: Text('${AppConfig.version} (${AppConfig.buildNumber})'),
|
|
495
|
+
// Displays: 1.3.0 (42)
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
**React Native:**
|
|
502
|
+
|
|
503
|
+
```tsx
|
|
504
|
+
import { APP_VERSION, BUILD_NUMBER } from './config/version';
|
|
505
|
+
|
|
506
|
+
export function SettingsScreen() {
|
|
507
|
+
return (
|
|
508
|
+
<View>
|
|
509
|
+
<Text>App Version</Text>
|
|
510
|
+
<Text>
|
|
511
|
+
{APP_VERSION} ({BUILD_NUMBER})
|
|
512
|
+
</Text>
|
|
513
|
+
</View>
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Using package.json dynamically (React Native):**
|
|
519
|
+
|
|
520
|
+
```tsx
|
|
521
|
+
import { version } from '../package.json';
|
|
522
|
+
|
|
523
|
+
export function SettingsScreen() {
|
|
524
|
+
return <Text>Version {version}</Text>;
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Build Number Management
|
|
529
|
+
|
|
530
|
+
**Strategy 1: Single Incremental** (Recommended)
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
Version 1.0.0 → Build 1
|
|
534
|
+
Version 1.0.1 → Build 2
|
|
535
|
+
Version 1.1.0 → Build 3
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**Strategy 2: Date-Based**
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
2026-03-09 → Build 2026030901
|
|
542
|
+
2026-03-09 (hotfix) → Build 2026030902
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
**Strategy 3: Platform-Specific**
|
|
546
|
+
|
|
547
|
+
```
|
|
548
|
+
iOS: 42
|
|
549
|
+
Android: 84 (2x iOS build number)
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
### Store Submission Checklist
|
|
553
|
+
|
|
554
|
+
**iOS (App Store Connect):**
|
|
555
|
+
|
|
556
|
+
- [ ] Build number incremented (required)
|
|
557
|
+
- [ ] Version follows SemVer (1.3.0)
|
|
558
|
+
- [ ] Archive uploaded via Xcode
|
|
559
|
+
- [ ] Screenshots updated (if UI changed)
|
|
560
|
+
- [ ] Release notes written
|
|
561
|
+
- [ ] Pricing & Availability confirmed
|
|
562
|
+
- [ ] Submit for review
|
|
563
|
+
|
|
564
|
+
**Android (Google Play Console):**
|
|
565
|
+
|
|
566
|
+
- [ ] versionCode incremented (required)
|
|
567
|
+
- [ ] versionName updated (1.3.0)
|
|
568
|
+
- [ ] AAB/APK uploaded
|
|
569
|
+
- [ ] Release notes in all languages
|
|
570
|
+
- [ ] Production/Beta/Internal track selected
|
|
571
|
+
- [ ] Rollout percentage set (e.g., 10%, 50%, 100%)
|
|
572
|
+
- [ ] Submit for review
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## Error Handling
|
|
577
|
+
|
|
578
|
+
### Build Number Not Incremented
|
|
579
|
+
|
|
580
|
+
```
|
|
581
|
+
❌ Error: Build number not incremented
|
|
582
|
+
|
|
583
|
+
Current build number: 42
|
|
584
|
+
New build number: 42
|
|
585
|
+
|
|
586
|
+
Build numbers MUST increment for store submissions.
|
|
587
|
+
|
|
588
|
+
Solution:
|
|
589
|
+
A) Auto-increment to 43
|
|
590
|
+
B) Manually specify: /flow-release 1.3.0+43
|
|
591
|
+
C) Cancel
|
|
592
|
+
|
|
593
|
+
Choice: _
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Version Mismatch Across Platforms
|
|
597
|
+
|
|
598
|
+
```
|
|
599
|
+
⚠️ Warning: Version mismatch detected
|
|
600
|
+
|
|
601
|
+
pubspec.yaml: 1.3.0+42
|
|
602
|
+
ios/Runner/Info.plist: 1.2.3 (build 41) ← Mismatch
|
|
603
|
+
android/app/build.gradle: 1.3.0 (code 42)
|
|
604
|
+
|
|
605
|
+
Solution:
|
|
606
|
+
A) Auto-sync all to 1.3.0+42
|
|
607
|
+
B) Cancel and fix manually
|
|
608
|
+
|
|
609
|
+
Choice: _
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
### Invalid Version Format
|
|
613
|
+
|
|
614
|
+
```
|
|
615
|
+
❌ Error: Invalid Flutter version format
|
|
616
|
+
|
|
617
|
+
Found: "version: 1.3.0"
|
|
618
|
+
Expected: "version: 1.3.0+42" (version+buildNumber)
|
|
619
|
+
|
|
620
|
+
Solution:
|
|
621
|
+
Add build number to pubspec.yaml:
|
|
622
|
+
version: 1.3.0+42
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
## Examples
|
|
628
|
+
|
|
629
|
+
### Example 1: Flutter App Release
|
|
630
|
+
|
|
631
|
+
```
|
|
632
|
+
User: /flow-release
|
|
633
|
+
|
|
634
|
+
Agent:
|
|
635
|
+
✓ Detected Flutter project (pubspec.yaml)
|
|
636
|
+
✓ Current version: 1.2.3+41
|
|
637
|
+
✓ Found 4 new screens, 1 new feature
|
|
638
|
+
|
|
639
|
+
Suggested: 1.3.0+42 (MINOR)
|
|
640
|
+
|
|
641
|
+
Files to update:
|
|
642
|
+
• pubspec.yaml
|
|
643
|
+
• ios/Runner/Info.plist
|
|
644
|
+
• android/app/build.gradle
|
|
645
|
+
• lib/config/app_config.dart
|
|
646
|
+
|
|
647
|
+
Continue? Y
|
|
648
|
+
|
|
649
|
+
✅ Release v1.3.0+42 completed!
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Example 2: React Native Hotfix
|
|
653
|
+
|
|
654
|
+
```
|
|
655
|
+
User: /flow-release --patch
|
|
656
|
+
|
|
657
|
+
Agent:
|
|
658
|
+
✓ Detected React Native project
|
|
659
|
+
✓ Current: 2.4.7 (iOS build 89, Android versionCode 89)
|
|
660
|
+
✓ Override: 2.4.8+90 (PATCH forced)
|
|
661
|
+
|
|
662
|
+
Will update:
|
|
663
|
+
• package.json
|
|
664
|
+
• ios/MyApp/Info.plist
|
|
665
|
+
• android/app/build.gradle
|
|
666
|
+
|
|
667
|
+
✅ Release v2.4.8+90 completed!
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
### Example 3: Expo App
|
|
671
|
+
|
|
672
|
+
```
|
|
673
|
+
User: /flow-release 3.0.0
|
|
674
|
+
|
|
675
|
+
Agent:
|
|
676
|
+
✓ Detected Expo project (app.json)
|
|
677
|
+
✓ Current: 2.9.5 (build 125)
|
|
678
|
+
✓ Requested: 3.0.0+126 (MAJOR)
|
|
679
|
+
|
|
680
|
+
⚠️ MAJOR version bump - breaking changes expected
|
|
681
|
+
|
|
682
|
+
Continue? Y
|
|
683
|
+
|
|
684
|
+
Will update:
|
|
685
|
+
• app.json (expo.version, ios.buildNumber, android.versionCode)
|
|
686
|
+
|
|
687
|
+
✅ Release v3.0.0+126 completed!
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
## Best Practices
|
|
693
|
+
|
|
694
|
+
1. **Always increment build numbers** - Required by Apple and Google
|
|
695
|
+
2. **Test on real devices** - Simulators don't catch all issues
|
|
696
|
+
3. **Run automated tests** - `flutter test` or `npm test`
|
|
697
|
+
4. **Check platform-specific code** - Ensure iOS/Android builds succeed
|
|
698
|
+
5. **TestFlight/Internal Testing first** - Validate with beta users
|
|
699
|
+
6. **Store screenshots updated** - If UI changed significantly
|
|
700
|
+
7. **Release notes** - Clear, user-friendly descriptions
|
|
701
|
+
8. **Gradual rollout** - Start with 10-20% on Google Play
|
|
702
|
+
9. **Monitor crash reports** - Firebase Crashlytics, Sentry
|
|
703
|
+
10. **Version display in app** - Help users verify they have latest
|
|
704
|
+
|
|
705
|
+
---
|
|
706
|
+
|
|
707
|
+
## Version Display Tips
|
|
708
|
+
|
|
709
|
+
### In-App Settings Screen
|
|
710
|
+
|
|
711
|
+
```dart
|
|
712
|
+
// Flutter
|
|
713
|
+
ListTile(
|
|
714
|
+
leading: Icon(Icons.info),
|
|
715
|
+
title: Text('Version'),
|
|
716
|
+
subtitle: Text('${AppConfig.version} (${AppConfig.buildNumber})'),
|
|
717
|
+
onTap: () {
|
|
718
|
+
// Show changelog dialog
|
|
719
|
+
},
|
|
720
|
+
)
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### About Dialog
|
|
724
|
+
|
|
725
|
+
```dart
|
|
726
|
+
// Flutter
|
|
727
|
+
showAboutDialog(
|
|
728
|
+
context: context,
|
|
729
|
+
applicationName: 'My App',
|
|
730
|
+
applicationVersion: '${AppConfig.version} (${AppConfig.buildNumber})',
|
|
731
|
+
applicationLegalese: '© 2026 Company Name',
|
|
732
|
+
);
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### Debug Banner (Development Only)
|
|
736
|
+
|
|
737
|
+
```dart
|
|
738
|
+
// Flutter
|
|
739
|
+
MaterialApp(
|
|
740
|
+
debugShowCheckedModeBanner: true,
|
|
741
|
+
home: Banner(
|
|
742
|
+
message: 'v${AppConfig.version}',
|
|
743
|
+
location: BannerLocation.topEnd,
|
|
744
|
+
child: HomeScreen(),
|
|
745
|
+
),
|
|
746
|
+
)
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
---
|
|
750
|
+
|
|
751
|
+
**BEGIN EXECUTION when user runs `/flow-release` command**
|