Commit 0a030d4
feat(build): Add CLI version metadata to build upload archives (#2890)
## Summary
Adds CLI version metadata to all zip archives created during build
uploads for debugging purposes.
Resolves EME-471
## Changes
- Adds a `.sentry-cli-metadata.txt` file at the root of each build
upload zip archive
- The file contains: `sentry-cli-version: <version>`
- Applied to both single-file uploads (APK, AAB) and directory uploads
(XCArchive)
- Uses the same compression and timestamp settings as other files to
maintain consistent checksums
- Adds support for `SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE`
environment variable to override the version in tests and allow for
deterministic chunk hashes
- The version override is checked at runtime (not just during
`cfg(test)`), allowing integration tests that spawn the CLI as a
subprocess to use the override
## Testing
- Integration tests use
`SENTRY_CLI_INTEGRATION_TEST_VERSION_OVERRIDE=0.0.0-test` to ensure
stable chunk hashes across releases
- The environment variable is properly passed to CLI subprocesses in
integration tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>1 parent ccb71af commit 0a030d4
File tree
6 files changed
+38
-3
lines changed- src
- commands/build
- utils/build
- tests/integration
- _expected_requests/build
- build
6 files changed
+38
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
| 460 | + | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| |||
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
79 | 106 | | |
80 | 107 | | |
81 | 108 | | |
| |||
108 | 135 | | |
109 | 136 | | |
110 | 137 | | |
| 138 | + | |
| 139 | + | |
111 | 140 | | |
112 | 141 | | |
113 | 142 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
0 commit comments