@upfluxhq/cli 1.0.1 → 1.0.2
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/README.md +62 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,6 +100,8 @@ upflux release [options]
|
|
|
100
100
|
| `-m, --mandatory` | | Mark update as mandatory |
|
|
101
101
|
| `-r, --rollout <number>` | | Rollout percentage (0-100, default: 100) |
|
|
102
102
|
| `-v, --version-range <range>` | | Binary version range (e.g., >=1.0.0) |
|
|
103
|
+
| `--min-binary-version <version>` | | Minimum native binary version required. Devices below this are directed to update from the App Store / Play Store before receiving this OTA. |
|
|
104
|
+
| `--skip-native-check` | | Skip automatic native change detection (useful in CI/CD) |
|
|
103
105
|
| `--dev` | | Create development bundle |
|
|
104
106
|
| `--skip-bundle` | | Skip bundling, use existing files in output dir |
|
|
105
107
|
| `--schedule` | | Create as draft, set schedule time in dashboard |
|
|
@@ -168,6 +170,63 @@ upflux release --label v1.0.0 --capacitor --web-dir dist
|
|
|
168
170
|
|
|
169
171
|
---
|
|
170
172
|
|
|
173
|
+
## Native Change Detection
|
|
174
|
+
|
|
175
|
+
The CLI automatically detects native code changes since your last release and warns you when a store update may be required. This helps prevent devices from receiving OTA updates that depend on native features not yet available in their installed binary.
|
|
176
|
+
|
|
177
|
+
### How It Works
|
|
178
|
+
|
|
179
|
+
1. After each successful release, the CLI saves the current **git commit hash** to `.upflux`.
|
|
180
|
+
2. On the next release, it runs `git diff <lastHash>..HEAD` against native files.
|
|
181
|
+
3. If changes are found, it warns you and offers to auto-set `--min-binary-version`.
|
|
182
|
+
|
|
183
|
+
> **Note:** Detection requires git. If the project is not a git repo, detection is silently skipped.
|
|
184
|
+
|
|
185
|
+
### Files Watched
|
|
186
|
+
|
|
187
|
+
| File | What is detected |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `android/app/build.gradle` | `versionName` bump, `minSdkVersion` change |
|
|
190
|
+
| `android/app/src/main/AndroidManifest.xml` | New permissions |
|
|
191
|
+
| `ios/Podfile` | New native pods |
|
|
192
|
+
| `ios/Podfile.lock` | Any pod version change |
|
|
193
|
+
| `package.json` | New native dependency packages |
|
|
194
|
+
|
|
195
|
+
### Example Interaction
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
⚠️ Native changes detected since last release:
|
|
199
|
+
|
|
200
|
+
Android:
|
|
201
|
+
• build.gradle: versionName → 2.0.0
|
|
202
|
+
• AndroidManifest.xml: New permission: android.permission.CAMERA
|
|
203
|
+
|
|
204
|
+
💡 Suggested flags:
|
|
205
|
+
--min-binary-version 2.0.0
|
|
206
|
+
--version-range ">=2.0.0"
|
|
207
|
+
|
|
208
|
+
? How would you like to handle these native changes?
|
|
209
|
+
❯ Auto-apply suggested flags (--min-binary-version 2.0.0 --version-range ">=2.0.0")
|
|
210
|
+
Enter min-binary-version manually
|
|
211
|
+
Continue without (not recommended for native changes)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Setting `--min-binary-version` Manually
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Require devices to have at least v2.0.0 binary before receiving this OTA
|
|
218
|
+
upflux release --label v2.0.0-ota --min-binary-version 2.0.0 --version-range ">=2.0.0"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Skipping in CI/CD
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# In CI, skip interactive detection and pass flag explicitly
|
|
225
|
+
upflux release --label v2.0.0 --min-binary-version 2.0.0 --skip-native-check
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
171
230
|
### `status`
|
|
172
231
|
|
|
173
232
|
Check deployment status and recent releases.
|
|
@@ -290,7 +349,9 @@ The CLI stores credentials in `.upflux` in the current directory:
|
|
|
290
349
|
"deploymentName": "staging"
|
|
291
350
|
}
|
|
292
351
|
],
|
|
293
|
-
"activeIndex": 0
|
|
352
|
+
"activeIndex": 0,
|
|
353
|
+
"lastReleaseHash": "a3f8c12d...",
|
|
354
|
+
"lastReleaseLabel": "v1.5.0"
|
|
294
355
|
}
|
|
295
356
|
```
|
|
296
357
|
|