sentry-cli 2.58.5__tar.gz → 2.58.6__tar.gz

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.
Files changed (177) hide show
  1. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/Cargo.lock +4 -3
  2. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/Cargo.toml +2 -1
  3. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/PKG-INFO +1 -1
  4. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/sentry_cli.egg-info/SOURCES.txt +1 -0
  6. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/mod.rs +7 -5
  7. sentry_cli-2.58.6/src/api/updating.rs +80 -0
  8. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/bashsupport.sh +3 -3
  9. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/bash_hook.rs +44 -26
  10. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/react_native/appcenter.rs +5 -1
  11. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/react_native/xcode.rs +7 -2
  12. sentry_cli-2.58.6/src/commands/releases/propose_version.rs +19 -0
  13. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_event.rs +9 -2
  14. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/config.rs +50 -10
  15. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/appcenter.rs +7 -2
  16. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/args.rs +10 -0
  17. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/metrics.rs +1 -1
  18. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/releases.rs +10 -6
  19. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/update.rs +29 -4
  20. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/xcode.rs +21 -8
  21. sentry_cli-2.58.5/src/commands/releases/propose_version.rs +0 -13
  22. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/LICENSE +0 -0
  23. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/MANIFEST.in +0 -0
  24. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/README.md +0 -0
  25. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/Cargo.toml +0 -0
  26. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/build.rs +0 -0
  27. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Package.swift +0 -0
  28. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +0 -0
  29. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/include/safeValueForKey.h +0 -0
  30. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/safeValueForKey.m +0 -0
  31. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/AssetCatalogParserTests.swift +0 -0
  32. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Info.plist +0 -0
  33. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Products/Applications/DemoApp.app/Assets.car +0 -0
  34. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/src/asset_catalog.rs +0 -0
  35. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/apple-catalog-parsing/src/lib.rs +0 -0
  36. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/build.rs +0 -0
  37. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/pyproject.toml +0 -0
  38. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/sentry_cli.egg-info/dependency_links.txt +0 -0
  39. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/sentry_cli.egg-info/top_level.txt +0 -0
  40. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/setup.cfg +0 -0
  41. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/setup.py +0 -0
  42. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/connection_manager.rs +0 -0
  43. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/artifact.rs +0 -0
  44. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/build.rs +0 -0
  45. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/compression.rs +0 -0
  46. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/dif.rs +0 -0
  47. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/file_state.rs +0 -0
  48. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
  49. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/mod.rs +0 -0
  50. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/upload/capability.rs +0 -0
  51. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/upload/mod.rs +0 -0
  52. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/chunking/upload/options.rs +0 -0
  53. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/deploy.rs +0 -0
  54. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/data_types/mod.rs +0 -0
  55. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/encoding.rs +0 -0
  56. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/envelopes_api.rs +0 -0
  57. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/errors/api_error.rs +0 -0
  58. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/errors/mod.rs +0 -0
  59. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/errors/sentry_error.rs +0 -0
  60. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/api/pagination.rs +0 -0
  61. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/build/mod.rs +0 -0
  62. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/build/upload.rs +0 -0
  63. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/dart_symbol_map/mod.rs +0 -0
  64. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/dart_symbol_map/upload.rs +0 -0
  65. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/bundle_jvm.rs +0 -0
  66. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/bundle_sources.rs +0 -0
  67. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/check.rs +0 -0
  68. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/find.rs +0 -0
  69. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/mod.rs +0 -0
  70. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/print_sources.rs +0 -0
  71. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/debug_files/upload.rs +0 -0
  72. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/deploys/list.rs +0 -0
  73. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/deploys/mod.rs +0 -0
  74. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/deploys/new.rs +0 -0
  75. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/derive_parser.rs +0 -0
  76. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/events/list.rs +0 -0
  77. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/events/mod.rs +0 -0
  78. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/files/delete.rs +0 -0
  79. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/files/list.rs +0 -0
  80. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/files/mod.rs +0 -0
  81. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/files/upload.rs +0 -0
  82. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/info.rs +0 -0
  83. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/issues/list.rs +0 -0
  84. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/issues/mod.rs +0 -0
  85. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/issues/mute.rs +0 -0
  86. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/issues/resolve.rs +0 -0
  87. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/issues/unresolve.rs +0 -0
  88. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/login.rs +0 -0
  89. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/logs/list.rs +0 -0
  90. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/logs/mod.rs +0 -0
  91. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/mod.rs +0 -0
  92. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/monitors/list.rs +0 -0
  93. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/monitors/mod.rs +0 -0
  94. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/monitors/run.rs +0 -0
  95. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/organizations/list.rs +0 -0
  96. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/organizations/mod.rs +0 -0
  97. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/projects/list.rs +0 -0
  98. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/projects/mod.rs +0 -0
  99. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/react_native/gradle.rs +0 -0
  100. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/react_native/mod.rs +0 -0
  101. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/archive.rs +0 -0
  102. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/delete.rs +0 -0
  103. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/finalize.rs +0 -0
  104. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/info.rs +0 -0
  105. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/list.rs +0 -0
  106. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/mod.rs +0 -0
  107. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/new.rs +0 -0
  108. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/restore.rs +0 -0
  109. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/releases/set_commits.rs +0 -0
  110. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/repos/list.rs +0 -0
  111. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/repos/mod.rs +0 -0
  112. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_envelope.rs +0 -0
  113. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/common_args.rs +0 -0
  114. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/distribution.rs +0 -0
  115. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/gauge.rs +0 -0
  116. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/increment.rs +0 -0
  117. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/mod.rs +0 -0
  118. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/send_metric/set.rs +0 -0
  119. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/sourcemaps/explain.rs +0 -0
  120. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/sourcemaps/inject.rs +0 -0
  121. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/sourcemaps/mod.rs +0 -0
  122. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/sourcemaps/resolve.rs +0 -0
  123. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/sourcemaps/upload.rs +0 -0
  124. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/uninstall.rs +0 -0
  125. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/update.rs +0 -0
  126. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/upload_dif.rs +0 -0
  127. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/upload_dsym.rs +0 -0
  128. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/commands/upload_proguard.rs +0 -0
  129. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/constants.rs +0 -0
  130. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/main.rs +0 -0
  131. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/android.rs +0 -0
  132. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/auth_token_impl.rs +0 -0
  133. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/error.rs +0 -0
  134. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/mod.rs +0 -0
  135. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/org_auth_token.rs +0 -0
  136. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/redacting.rs +0 -0
  137. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/test.rs +0 -0
  138. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/auth_token/user_auth_token.rs +0 -0
  139. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/build/apple.rs +0 -0
  140. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/build/mod.rs +0 -0
  141. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/build/normalize.rs +0 -0
  142. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/build/validation.rs +0 -0
  143. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/chunks/mod.rs +0 -0
  144. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/chunks/options.rs +0 -0
  145. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/chunks/types.rs +0 -0
  146. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/chunks/upload.rs +0 -0
  147. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/ci.rs +0 -0
  148. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/cordova.rs +0 -0
  149. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/dif.rs +0 -0
  150. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/dif_upload/error.rs +0 -0
  151. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/dif_upload/mod.rs +0 -0
  152. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/event.rs +0 -0
  153. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/file_search.rs +0 -0
  154. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/file_upload.rs +0 -0
  155. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/formatting.rs +0 -0
  156. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/fs.rs +0 -0
  157. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/http.rs +0 -0
  158. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/logging.rs +0 -0
  159. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/mod.rs +0 -0
  160. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/non_empty.rs +0 -0
  161. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/progress.rs +0 -0
  162. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/proguard/mapping.rs +0 -0
  163. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/proguard/mod.rs +0 -0
  164. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/proguard/upload.rs +0 -0
  165. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/retry.rs +0 -0
  166. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_default_twenty.snap +0 -0
  167. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_ignore_missing.snap +0 -0
  168. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_base.snap +0 -0
  169. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_previous_commit.snap +0 -0
  170. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/snapshots/sentry_cli__utils__vcs__tests__get_commits_from_git.snap +0 -0
  171. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/source_bundle.rs +0 -0
  172. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/sourcemaps/inject.rs +0 -0
  173. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/sourcemaps.rs +0 -0
  174. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/system.rs +0 -0
  175. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/ui.rs +0 -0
  176. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/value_parsers.rs +0 -0
  177. {sentry_cli-2.58.5 → sentry_cli-2.58.6}/src/utils/vcs.rs +0 -0
@@ -2726,7 +2726,7 @@ dependencies = [
2726
2726
 
2727
2727
  [[package]]
2728
2728
  name = "sentry-cli"
2729
- version = "2.58.5"
2729
+ version = "2.58.6"
2730
2730
  dependencies = [
2731
2731
  "anyhow",
2732
2732
  "anylog",
@@ -2781,6 +2781,7 @@ dependencies = [
2781
2781
  "serde_json",
2782
2782
  "serial_test",
2783
2783
  "sha1_smol",
2784
+ "sha2",
2784
2785
  "sourcemap",
2785
2786
  "symbolic",
2786
2787
  "tempfile",
@@ -3446,9 +3447,9 @@ dependencies = [
3446
3447
 
3447
3448
  [[package]]
3448
3449
  name = "typenum"
3449
- version = "1.18.0"
3450
+ version = "1.20.0"
3450
3451
  source = "registry+https://github.com/rust-lang/crates.io-index"
3451
- checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
3452
+ checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de"
3452
3453
 
3453
3454
  [[package]]
3454
3455
  name = "ucd-trie"
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  build = "build.rs"
3
3
  name = "sentry-cli"
4
- version = "2.58.5"
4
+ version = "2.58.6"
5
5
  edition = "2021"
6
6
  rust-version = "1.91"
7
7
 
@@ -79,6 +79,7 @@ secrecy = "0.8.0"
79
79
  lru = "0.16.0"
80
80
  backon = { version = "1.5.2", features = ["std", "std-blocking-sleep"] }
81
81
  brotli = "8.0.2"
82
+ sha2 = "0.10.9"
82
83
 
83
84
  [dev-dependencies]
84
85
  assert_cmd = "2.0.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_cli
3
- Version: 2.58.5
3
+ Version: 2.58.6
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_cli
3
- Version: 2.58.5
3
+ Version: 2.58.6
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -31,6 +31,7 @@ src/api/encoding.rs
31
31
  src/api/envelopes_api.rs
32
32
  src/api/mod.rs
33
33
  src/api/pagination.rs
34
+ src/api/updating.rs
34
35
  src/api/data_types/deploy.rs
35
36
  src/api/data_types/mod.rs
36
37
  src/api/data_types/chunking/artifact.rs
@@ -10,6 +10,7 @@ mod data_types;
10
10
  mod encoding;
11
11
  mod errors;
12
12
  mod pagination;
13
+ mod updating;
13
14
 
14
15
  use std::borrow::Cow;
15
16
  use std::cell::RefCell;
@@ -62,6 +63,7 @@ use encoding::{PathArg, QueryArg};
62
63
  use errors::{ApiError, ApiErrorKind, ApiResult, SentryError};
63
64
 
64
65
  pub use self::data_types::*;
66
+ pub use crate::api::updating::ReleaseRegistryFile;
65
67
 
66
68
  lazy_static! {
67
69
  static ref API: Mutex<Option<Arc<Api>>> = Mutex::new(None);
@@ -344,13 +346,13 @@ impl Api {
344
346
 
345
347
  if resp.status() == 200 {
346
348
  let info: RegistryRelease = resp.convert()?;
347
- for (filename, _download_url) in info.file_urls {
349
+ for (filename, _download_url) in info.files {
348
350
  info!("Found asset {filename}");
349
351
  if filename == ref_name {
350
352
  return Ok(Some(SentryCliRelease {
351
353
  version: info.version,
352
354
  #[cfg(not(feature = "managed"))]
353
- download_url: _download_url,
355
+ download_info: _download_url,
354
356
  }));
355
357
  }
356
358
  }
@@ -2199,17 +2201,17 @@ pub struct ReleaseCommit {
2199
2201
  pub id: String,
2200
2202
  }
2201
2203
 
2202
- #[derive(Debug, Serialize, Deserialize)]
2204
+ #[derive(Debug, Deserialize)]
2203
2205
  struct RegistryRelease {
2204
2206
  version: String,
2205
- file_urls: HashMap<String, String>,
2207
+ files: HashMap<String, ReleaseRegistryFile>,
2206
2208
  }
2207
2209
 
2208
2210
  /// Information about sentry CLI releases
2209
2211
  pub struct SentryCliRelease {
2210
2212
  pub version: String,
2211
2213
  #[cfg(not(feature = "managed"))]
2212
- pub download_url: String,
2214
+ pub download_info: ReleaseRegistryFile,
2213
2215
  }
2214
2216
 
2215
2217
  #[derive(Debug, Deserialize, Default)]
@@ -0,0 +1,80 @@
1
+ //! Types for updating functionality.
2
+
3
+ use std::ops::Deref;
4
+ use std::str::FromStr;
5
+
6
+ use anyhow::{Context as _, Error};
7
+ use serde::de::Error as _;
8
+ use serde::{Deserialize, Deserializer};
9
+
10
+ /// A SHA-256 sum in hexadecimal representation is 64 characters long.
11
+ const SHA256_SUM_HEX_LENGTH: usize = 64;
12
+
13
+ #[derive(Debug)]
14
+ pub struct Sha256Sum([u8; 32]);
15
+
16
+ #[derive(Debug, Deserialize)]
17
+ pub struct ReleaseRegistryFile {
18
+ pub url: String,
19
+ #[serde(rename = "checksums")]
20
+ #[serde(deserialize_with = "deserialize_checksums")]
21
+ pub checksum: Sha256Sum,
22
+ }
23
+
24
+ fn deserialize_checksums<'de, D>(deserializer: D) -> Result<Sha256Sum, D::Error>
25
+ where
26
+ D: Deserializer<'de>,
27
+ {
28
+ #[derive(Deserialize)]
29
+ #[serde(rename_all = "kebab-case")]
30
+ struct RawChecksumsMapping {
31
+ sha256_hex: String,
32
+ }
33
+
34
+ let RawChecksumsMapping { sha256_hex } = RawChecksumsMapping::deserialize(deserializer)?;
35
+ sha256_hex.parse().map_err(D::Error::custom)
36
+ }
37
+
38
+ impl FromStr for Sha256Sum {
39
+ type Err = Error;
40
+
41
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
42
+ if s.len() != SHA256_SUM_HEX_LENGTH {
43
+ anyhow::bail!(
44
+ "cannot parse SHA-256: expected a {SHA256_SUM_HEX_LENGTH}-character long string"
45
+ );
46
+ }
47
+
48
+ let mut bytes = [0u8; 32];
49
+
50
+ bytes
51
+ .iter_mut()
52
+ .zip(s.as_bytes().chunks(2))
53
+ .map(|(byte, hex_byte)| {
54
+ let hex_str = str::from_utf8(hex_byte)?;
55
+ *byte = u8::from_str_radix(hex_str, 16)?;
56
+ Ok::<_, Self::Err>(())
57
+ })
58
+ .map(|result| result.context("cannot parse SHA-256: not a valid hex string"))
59
+ .collect::<Result<Vec<()>, _>>()?;
60
+
61
+ Ok(Sha256Sum(bytes))
62
+ }
63
+ }
64
+
65
+ impl Deref for Sha256Sum {
66
+ type Target = [u8; 32];
67
+
68
+ fn deref(&self) -> &Self::Target {
69
+ &self.0
70
+ }
71
+ }
72
+
73
+ impl<Rhs> PartialEq<Rhs> for Sha256Sum
74
+ where
75
+ Rhs: Deref<Target = [u8]>,
76
+ {
77
+ fn eq(&self, other: &Rhs) -> bool {
78
+ self.0 == **other
79
+ }
80
+ }
@@ -1,5 +1,5 @@
1
- _SENTRY_TRACEBACK_FILE="___SENTRY_TRACEBACK_FILE___"
2
- _SENTRY_LOG_FILE="___SENTRY_LOG_FILE___"
1
+ _SENTRY_TRACEBACK_FILE=___SENTRY_TRACEBACK_FILE___
2
+ _SENTRY_LOG_FILE=___SENTRY_LOG_FILE___
3
3
 
4
4
  if [ "${SENTRY_CLI_NO_EXIT_TRAP-0}" != 1 ]; then
5
5
  trap _sentry_exit_trap EXIT
@@ -32,7 +32,7 @@ _sentry_err_trap() {
32
32
  echo "@exit_code:${_exit_code}" >> "$_SENTRY_TRACEBACK_FILE"
33
33
 
34
34
  : >> "$_SENTRY_LOG_FILE"
35
- export SENTRY_LAST_EVENT=$(___SENTRY_CLI___ bash-hook --send-event --traceback "$_SENTRY_TRACEBACK_FILE" ___SENTRY_TAGS___ ___SENTRY_RELEASE___ --log "$_SENTRY_LOG_FILE" ___SENTRY_NO_ENVIRON___)
35
+ export SENTRY_LAST_EVENT=$(___SENTRY_CLI___ bash-hook --send-event --traceback "$_SENTRY_TRACEBACK_FILE" ___SENTRY_TAGS___ ___SENTRY_RELEASE___ ___SENTRY_ALLOW_XCODE_INFOPLIST_PREPROCESSING___ --log "$_SENTRY_LOG_FILE")
36
36
  rm -f "$_SENTRY_TRACEBACK_FILE" "$_SENTRY_LOG_FILE"
37
37
  }
38
38
 
@@ -11,11 +11,12 @@ use anyhow::{format_err, Result};
11
11
  use clap::{builder::ArgPredicate, Arg, ArgAction, ArgMatches, Command};
12
12
  use lazy_static::lazy_static;
13
13
  use regex::Regex;
14
- use sentry::protocol::{Event, Exception, Frame, Stacktrace, User, Value};
14
+ use sentry::protocol::{Event, Exception, Frame, Stacktrace, User};
15
15
  use uuid::Uuid;
16
16
 
17
17
  use crate::commands::send_event;
18
18
  use crate::config::Config;
19
+ use crate::utils::args::allow_xcode_infoplist_preprocessing_arg;
19
20
  use crate::utils::event::{attach_logfile, get_sdk_info};
20
21
  use crate::utils::releases::detect_release_name;
21
22
 
@@ -40,8 +41,9 @@ pub fn make_command(command: Command) -> Command {
40
41
  .arg(
41
42
  Arg::new("no_environ")
42
43
  .long("no-environ")
44
+ .hide(true)
43
45
  .action(ArgAction::SetTrue)
44
- .help("Do not send environment variables along"),
46
+ .help("No-op, as we never send envrionment variables."),
45
47
  )
46
48
  .arg(
47
49
  Arg::new("cli")
@@ -49,6 +51,7 @@ pub fn make_command(command: Command) -> Command {
49
51
  .value_name("CMD")
50
52
  .help("Explicitly set/override the sentry-cli command"),
51
53
  )
54
+ .arg(allow_xcode_infoplist_preprocessing_arg())
52
55
  .arg(
53
56
  Arg::new("send_event")
54
57
  .long("send-event")
@@ -87,13 +90,15 @@ fn send_event(
87
90
  logfile: &str,
88
91
  tags: &[&String],
89
92
  release: Option<String>,
90
- environ: bool,
93
+ allow_xcode_infoplist_preprocessing: bool,
91
94
  ) -> Result<()> {
92
95
  let config = Config::current();
93
96
 
94
97
  let mut event = Event {
95
98
  environment: config.get_environment().map(Into::into),
96
- release: release.or(detect_release_name().ok()).map(Into::into),
99
+ release: release
100
+ .or(detect_release_name(allow_xcode_infoplist_preprocessing).ok())
101
+ .map(Into::into),
97
102
  sdk: Some(get_sdk_info()),
98
103
  user: whoami::fallible::username().ok().map(|n| User {
99
104
  username: Some(n),
@@ -112,13 +117,6 @@ fn send_event(
112
117
  event.tags.insert(key.into(), value.into());
113
118
  }
114
119
 
115
- if environ {
116
- event.extra.insert(
117
- "environ".into(),
118
- Value::Object(env::vars().map(|(k, v)| (k, Value::String(v))).collect()),
119
- );
120
- }
121
-
122
120
  let mut cmd = "unknown".to_owned();
123
121
  let mut exit_code = 1;
124
122
  let mut frames = vec![];
@@ -208,6 +206,10 @@ fn send_event(
208
206
  Ok(())
209
207
  }
210
208
 
209
+ fn shell_quote(value: &str) -> String {
210
+ format!("'{}'", value.replace('\'', r"'\''"))
211
+ }
212
+
211
213
  pub fn execute(matches: &ArgMatches) -> Result<()> {
212
214
  let release = Config::current().get_release(matches).ok();
213
215
 
@@ -222,7 +224,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
222
224
  matches.get_one::<String>("log").unwrap(),
223
225
  &tags,
224
226
  release,
225
- !matches.get_flag("no_environ"),
227
+ matches.get_flag("allow_xcode_infoplist_preprocessing"),
226
228
  );
227
229
  }
228
230
 
@@ -235,15 +237,18 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
235
237
  let mut script = BASH_SCRIPT
236
238
  .replace(
237
239
  "___SENTRY_TRACEBACK_FILE___",
238
- &traceback.display().to_string(),
240
+ &shell_quote(&traceback.display().to_string()),
239
241
  )
240
- .replace("___SENTRY_LOG_FILE___", &log.display().to_string());
242
+ .replace(
243
+ "___SENTRY_LOG_FILE___",
244
+ &shell_quote(&log.display().to_string()),
245
+ );
241
246
 
242
247
  script = script.replace(
243
248
  " ___SENTRY_TAGS___",
244
249
  &tags
245
250
  .iter()
246
- .map(|tag| format!(" --tag \"{tag}\""))
251
+ .map(|tag| format!(" --tag {}", shell_quote(tag)))
247
252
  .collect::<Vec<_>>()
248
253
  .join(""),
249
254
  );
@@ -251,26 +256,26 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
251
256
  script = match release {
252
257
  Some(release) => script.replace(
253
258
  " ___SENTRY_RELEASE___",
254
- format!(" --release \"{release}\"").as_str(),
259
+ format!(" --release {}", shell_quote(&release)).as_str(),
255
260
  ),
256
261
  None => script.replace(" ___SENTRY_RELEASE___", ""),
257
262
  };
258
263
 
259
264
  script = script.replace(
260
265
  "___SENTRY_CLI___",
261
- matches
262
- .get_one::<String>("cli")
263
- .map_or_else(
264
- || env::current_exe().unwrap().display().to_string(),
265
- String::clone,
266
- )
267
- .as_str(),
266
+ &shell_quote(&matches.get_one::<String>("cli").map_or_else(
267
+ || env::current_exe().unwrap().display().to_string(),
268
+ String::clone,
269
+ )),
268
270
  );
269
271
 
270
- if matches.get_flag("no_environ") {
271
- script = script.replace("___SENTRY_NO_ENVIRON___", "--no-environ");
272
+ if matches.get_flag("allow_xcode_infoplist_preprocessing") {
273
+ script = script.replace(
274
+ " ___SENTRY_ALLOW_XCODE_INFOPLIST_PREPROCESSING___",
275
+ " --allow-xcode-infoplist-preprocessing",
276
+ );
272
277
  } else {
273
- script = script.replace("___SENTRY_NO_ENVIRON___", "");
278
+ script = script.replace(" ___SENTRY_ALLOW_XCODE_INFOPLIST_PREPROCESSING___", "");
274
279
  }
275
280
 
276
281
  if !matches.get_flag("no_exit") {
@@ -279,3 +284,16 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
279
284
  println!("{script}");
280
285
  Ok(())
281
286
  }
287
+
288
+ #[cfg(test)]
289
+ mod tests {
290
+ use super::shell_quote;
291
+
292
+ #[test]
293
+ fn shell_quote_handles_special_characters() {
294
+ assert_eq!(
295
+ shell_quote("it's $(unsafe); && ok"),
296
+ "'it'\\''s $(unsafe); && ok'"
297
+ );
298
+ }
299
+ }
@@ -14,7 +14,9 @@ use crate::api::Api;
14
14
  use crate::config::Config;
15
15
  use crate::constants::DEFAULT_MAX_WAIT;
16
16
  use crate::utils::appcenter::{get_appcenter_package, get_react_native_appcenter_release};
17
- use crate::utils::args::{validate_distribution, ArgExt as _};
17
+ use crate::utils::args::{
18
+ allow_xcode_infoplist_preprocessing_arg, validate_distribution, ArgExt as _,
19
+ };
18
20
  use crate::utils::file_search::ReleaseFileSearch;
19
21
  use crate::utils::file_upload::UploadContext;
20
22
  use crate::utils::sourcemaps::SourceMapProcessor;
@@ -108,6 +110,7 @@ pub fn make_command(command: Command) -> Command {
108
110
  but at most for the given number of seconds.",
109
111
  ),
110
112
  )
113
+ .arg(allow_xcode_infoplist_preprocessing_arg())
111
114
  }
112
115
 
113
116
  pub fn execute(matches: &ArgMatches) -> Result<()> {
@@ -146,6 +149,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
146
149
  matches
147
150
  .get_one::<String>("release_name")
148
151
  .map(String::as_str),
152
+ matches.get_flag("allow_xcode_infoplist_preprocessing"),
149
153
  )?;
150
154
  if print_release_name {
151
155
  println!("{release}");
@@ -18,7 +18,9 @@ use serde_json::Value;
18
18
  use crate::api::Api;
19
19
  use crate::config::Config;
20
20
  use crate::constants::DEFAULT_MAX_WAIT;
21
- use crate::utils::args::{validate_distribution, ArgExt as _};
21
+ use crate::utils::args::{
22
+ allow_xcode_infoplist_preprocessing_arg, validate_distribution, ArgExt as _,
23
+ };
22
24
  use crate::utils::file_search::ReleaseFileSearch;
23
25
  use crate::utils::file_upload::UploadContext;
24
26
  use crate::utils::fs::TempFile;
@@ -122,6 +124,7 @@ pub fn make_command(command: Command) -> Command {
122
124
  but at most for the given number of seconds.",
123
125
  ),
124
126
  )
127
+ .arg(allow_xcode_infoplist_preprocessing_arg())
125
128
  .arg(
126
129
  Arg::new("no_auto_release")
127
130
  .long("no-auto-release")
@@ -358,7 +361,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
358
361
  (Err(_), Err(_)) => {
359
362
  // Neither environment variable is present, attempt to parse Info.plist
360
363
  info!("Parsing Info.plist");
361
- match InfoPlist::discover_from_env() {
364
+ match InfoPlist::discover_from_env(
365
+ matches.get_flag("allow_xcode_infoplist_preprocessing"),
366
+ ) {
362
367
  Ok(Some(plist)) => {
363
368
  // Successfully discovered and parsed Info.plist
364
369
  let dist_string = plist.build().to_owned();
@@ -0,0 +1,19 @@
1
+ use anyhow::Result;
2
+ use clap::{ArgMatches, Command};
3
+
4
+ use crate::utils::args::allow_xcode_infoplist_preprocessing_arg;
5
+ use crate::utils::releases::detect_release_name;
6
+
7
+ pub fn make_command(command: Command) -> Command {
8
+ command
9
+ .about("Propose a version name for a new release.")
10
+ .arg(allow_xcode_infoplist_preprocessing_arg())
11
+ }
12
+
13
+ pub fn execute(matches: &ArgMatches) -> Result<()> {
14
+ println!(
15
+ "{}",
16
+ detect_release_name(matches.get_flag("allow_xcode_infoplist_preprocessing"))?
17
+ );
18
+ Ok(())
19
+ }
@@ -16,7 +16,9 @@ use serde_json::Value;
16
16
 
17
17
  use crate::api::envelopes_api::EnvelopesApi;
18
18
  use crate::constants::USER_AGENT;
19
- use crate::utils::args::{get_timestamp, validate_distribution};
19
+ use crate::utils::args::{
20
+ allow_xcode_infoplist_preprocessing_arg, get_timestamp, validate_distribution,
21
+ };
20
22
  use crate::utils::event::{attach_logfile, get_sdk_info};
21
23
  use crate::utils::releases::detect_release_name;
22
24
 
@@ -148,6 +150,7 @@ pub fn make_command(command: Command) -> Command {
148
150
  .long("logfile")
149
151
  .help(format!("Send a logfile as breadcrumbs with the event (last {MAX_BREADCRUMBS} records)")),
150
152
  )
153
+ .arg(allow_xcode_infoplist_preprocessing_arg())
151
154
  .arg(
152
155
  Arg::new("with_categories")
153
156
  .long("with-categories")
@@ -231,7 +234,11 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
231
234
  release: matches
232
235
  .get_one::<String>("release")
233
236
  .map(|s| Cow::Owned(s.clone()))
234
- .or_else(|| detect_release_name().ok().map(Cow::from)),
237
+ .or_else(|| {
238
+ detect_release_name(matches.get_flag("allow_xcode_infoplist_preprocessing"))
239
+ .ok()
240
+ .map(Cow::from)
241
+ }),
235
242
  dist: matches
236
243
  .get_one::<String>("dist")
237
244
  .map(|s| Cow::Owned(s.clone())),
@@ -3,7 +3,7 @@ use std::env;
3
3
  use std::env::VarError;
4
4
  use std::fs;
5
5
  use std::fs::OpenOptions;
6
- use std::io;
6
+ use std::io::{self, Write as _};
7
7
  use std::num::ParseIntError;
8
8
  use std::path::{Path, PathBuf};
9
9
  use std::sync::Arc;
@@ -16,6 +16,7 @@ use log::{debug, info, set_max_level, warn};
16
16
  use parking_lot::Mutex;
17
17
  use secrecy::ExposeSecret as _;
18
18
  use sentry::types::Dsn;
19
+ use uuid::Uuid;
19
20
 
20
21
  use crate::constants::CONFIG_INI_FILE_PATH;
21
22
  use crate::constants::DEFAULT_MAX_DIF_ITEM_SIZE;
@@ -157,8 +158,17 @@ impl Config {
157
158
 
158
159
  /// Write the current config state back into the file.
159
160
  pub fn save(&self) -> Result<()> {
161
+ // Make a unique temp path, containing a random UUID
162
+ let temp_path = self
163
+ .filename
164
+ .clone()
165
+ .with_added_extension(Uuid::new_v4().to_string());
166
+
160
167
  let mut options = OpenOptions::new();
161
- options.write(true).truncate(true).create(true);
168
+
169
+ // Set options so that the file fails to be written if it already exists. It should not
170
+ // exist, because the path contains a random UUID.
171
+ options.write(true).create_new(true);
162
172
 
163
173
  // Remove all non-user permissions for the newly created file
164
174
  #[cfg(not(windows))]
@@ -167,9 +177,17 @@ impl Config {
167
177
  options.mode(0o600);
168
178
  }
169
179
 
170
- let mut file = options.open(&self.filename)?;
171
- self.ini.write_to(&mut file)?;
172
- Ok(())
180
+ {
181
+ let mut file = options.open(&temp_path)?;
182
+ self.ini.write_to(&mut file).and_then(|()| file.flush())
183
+ // drop file handle
184
+ }
185
+ .and_then(|()| fs::rename(&temp_path, &self.filename))
186
+ .inspect_err(|_| {
187
+ // Best-effort cleanup attempt of the temporary file; errors intentionally ignored.
188
+ let _ = fs::remove_file(&temp_path);
189
+ })
190
+ .map_err(Into::into)
173
191
  }
174
192
 
175
193
  /// Returns the auth info
@@ -310,12 +328,14 @@ impl Config {
310
328
  }
311
329
 
312
330
  /// Indicates whether SSL verification should be on or off.
331
+ ///
332
+ /// Parses the `verify_ssl` key fron the `http` section. Returns `false` only when the key
333
+ /// equals `"false"` on a case-insensitive basis; returns `true` otherwise.
313
334
  pub fn should_verify_ssl(&self) -> bool {
314
- let val = self.ini.get_from(Some("http"), "verify_ssl");
315
- match val {
316
- None => true,
317
- Some(val) => val == "true",
318
- }
335
+ self.ini
336
+ .get_from(Some("http"), "verify_ssl")
337
+ .map(|val| !val.eq_ignore_ascii_case("false"))
338
+ .unwrap_or(true)
319
339
  }
320
340
 
321
341
  /// Indicates whether uploads may use gzip transfer encoding.
@@ -816,6 +836,26 @@ mod tests {
816
836
 
817
837
  use super::*;
818
838
 
839
+ #[cfg(not(windows))]
840
+ #[test]
841
+ fn save_restricts_existing_file_permissions() {
842
+ use std::os::unix::fs::PermissionsExt as _;
843
+
844
+ let dir = tempfile::tempdir().unwrap();
845
+ let filename = dir.path().join(".sentryclirc");
846
+ fs::write(&filename, "[defaults]\nurl=https://sentry.io/\n").unwrap();
847
+ fs::set_permissions(&filename, fs::Permissions::from_mode(0o644)).unwrap();
848
+
849
+ Config::from_file(filename.clone(), Ini::new())
850
+ .save()
851
+ .unwrap();
852
+
853
+ assert_eq!(
854
+ fs::metadata(filename).unwrap().permissions().mode() & 0o777,
855
+ 0o600
856
+ );
857
+ }
858
+
819
859
  #[test]
820
860
  fn test_get_api_endpoint() {
821
861
  let config = Config {
@@ -149,6 +149,7 @@ pub fn get_react_native_appcenter_release(
149
149
  bundle_id_override: Option<&str>,
150
150
  version_name_override: Option<&str>,
151
151
  release_name_override: Option<&str>,
152
+ allow_xcode_infoplist_preprocessing: bool,
152
153
  ) -> Result<String> {
153
154
  let bundle_id_ovrr = bundle_id_override.unwrap_or("");
154
155
  let version_name_ovrr = version_name_override.unwrap_or("");
@@ -175,8 +176,12 @@ pub fn get_react_native_appcenter_release(
175
176
 
176
177
  for entry in (glob_with("ios/*.xcodeproj", opts)?).flatten() {
177
178
  let pi = XcodeProjectInfo::from_path(entry)?;
178
- if let Some(ipl) = InfoPlist::from_project_info(&pi)? {
179
- if let Some(release_name) = get_xcode_release_name(Some(ipl))? {
179
+ if let Some(ipl) =
180
+ InfoPlist::from_project_info(&pi, allow_xcode_infoplist_preprocessing)?
181
+ {
182
+ if let Some(release_name) =
183
+ get_xcode_release_name(Some(ipl), allow_xcode_infoplist_preprocessing)?
184
+ {
180
185
  let vec: Vec<&str> = release_name.split('@').collect();
181
186
  let bundle_id = if bundle_id_ovrr.is_empty() {
182
187
  vec[0]
@@ -68,6 +68,16 @@ pub fn validate_distribution(v: &str) -> Result<String, String> {
68
68
  }
69
69
  }
70
70
 
71
+ pub fn allow_xcode_infoplist_preprocessing_arg() -> Arg {
72
+ Arg::new("allow_xcode_infoplist_preprocessing")
73
+ .long("allow-xcode-infoplist-preprocessing")
74
+ .action(ArgAction::SetTrue)
75
+ .help(
76
+ "Allow Xcode Info.plist preprocessing with cc. This passes Xcode project settings to \
77
+ the compiler. Do not use with untrusted code!",
78
+ )
79
+ }
80
+
71
81
  pub fn get_timestamp(value: &str) -> Result<DateTime<Utc>> {
72
82
  if let Ok(int) = value.parse::<i64>() {
73
83
  #[expect(clippy::unwrap_used, reason = "legacy code")]
@@ -11,7 +11,7 @@ impl DefaultTags for Vec<(String, String)> {
11
11
  let contains_release = self.iter().any(|(key, _)| key == "release");
12
12
  let contains_environment = self.iter().any(|(key, _)| key == "environment");
13
13
  if !contains_release {
14
- if let Ok(release) = releases::detect_release_name() {
14
+ if let Ok(release) = releases::detect_release_name(false) {
15
15
  self.push(("release".into(), release));
16
16
  }
17
17
  }