Repository navigation
Commit 78c8547
authored
[stable] fix: forward --build-name and --build-number to desktop version.json (#191602)
### Issue Link:
#152236
### Impact Description:
On desktop platforms (Linux, Windows, macOS), passing `--build-name` or `--build-number` to `flutter build` does not forward these values to the desktop assemble build backend. As a result, the generated `flutter_assets/version.json` contains default pubspec version values instead of the values passed on the command line, breaking version reporting in packages like `package_info_plus` and CI release pipelines.
### Changelog Description:
[flutter/152236] Forward `--build-name` and `--build-number` flags to the desktop build pipeline so generated `version.json` reflects command-line build version parameters on desktop platforms.
### Workaround:
Manually edit the version string in `pubspec.yaml` prior to building.
### Risk:
### Test Coverage:
### Validation Steps:
1. Run `flutter build linux --build-name=4.5.6 --build-number=789` (or on windows/macos).
2. Inspect the generated `build/linux/x64/release/bundle/data/flutter_assets/version.json`.
3. Verify that `version.json` contains `"version": "4.5.6"` and `"build_number": "789"`.1 parent 2c72122 commit 78c8547
3 files changed
Lines changed: 20 additions & 0 deletions
File tree
- packages/flutter_tools
- bin
- lib/src
- test/general.shard
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
292 | 306 | | |
293 | 307 | | |
294 | 308 | | |
| |||
0 commit comments