sentry-cli 2.58.1__tar.gz → 2.58.2__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 (174) hide show
  1. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/Cargo.lock +1 -1
  2. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/Cargo.toml +2 -3
  3. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/PKG-INFO +1 -1
  4. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/build.rs +23 -17
  6. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/mod.rs +1 -1
  7. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/mod.rs +0 -13
  8. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/build/upload.rs +55 -37
  9. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/releases.rs +1 -1
  10. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/vcs.rs +40 -28
  11. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/LICENSE +0 -0
  12. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/MANIFEST.in +0 -0
  13. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/README.md +0 -0
  14. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/Cargo.toml +0 -0
  15. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/build.rs +0 -0
  16. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Package.swift +0 -0
  17. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +0 -0
  18. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/include/safeValueForKey.h +0 -0
  19. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/safeValueForKey.m +0 -0
  20. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/AssetCatalogParserTests.swift +0 -0
  21. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Info.plist +0 -0
  22. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Products/Applications/DemoApp.app/Assets.car +0 -0
  23. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/src/asset_catalog.rs +0 -0
  24. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/apple-catalog-parsing/src/lib.rs +0 -0
  25. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/build.rs +0 -0
  26. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/pyproject.toml +0 -0
  27. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/sentry_cli.egg-info/SOURCES.txt +0 -0
  28. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/sentry_cli.egg-info/dependency_links.txt +0 -0
  29. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/sentry_cli.egg-info/top_level.txt +0 -0
  30. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/setup.cfg +0 -0
  31. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/setup.py +0 -0
  32. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/connection_manager.rs +0 -0
  33. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/artifact.rs +0 -0
  34. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/compression.rs +0 -0
  35. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/dif.rs +0 -0
  36. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/file_state.rs +0 -0
  37. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
  38. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/capability.rs +0 -0
  39. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/mod.rs +0 -0
  40. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/options.rs +0 -0
  41. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/deploy.rs +0 -0
  42. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/data_types/mod.rs +0 -0
  43. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/encoding.rs +0 -0
  44. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/envelopes_api.rs +0 -0
  45. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/errors/api_error.rs +0 -0
  46. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/errors/mod.rs +0 -0
  47. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/errors/sentry_error.rs +0 -0
  48. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/api/pagination.rs +0 -0
  49. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/bashsupport.sh +0 -0
  50. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/bash_hook.rs +0 -0
  51. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/build/mod.rs +0 -0
  52. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/dart_symbol_map/mod.rs +0 -0
  53. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/dart_symbol_map/upload.rs +0 -0
  54. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/bundle_jvm.rs +0 -0
  55. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/bundle_sources.rs +0 -0
  56. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/check.rs +0 -0
  57. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/find.rs +0 -0
  58. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/mod.rs +0 -0
  59. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/print_sources.rs +0 -0
  60. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/debug_files/upload.rs +0 -0
  61. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/deploys/list.rs +0 -0
  62. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/deploys/mod.rs +0 -0
  63. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/deploys/new.rs +0 -0
  64. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/derive_parser.rs +0 -0
  65. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/events/list.rs +0 -0
  66. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/events/mod.rs +0 -0
  67. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/files/delete.rs +0 -0
  68. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/files/list.rs +0 -0
  69. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/files/mod.rs +0 -0
  70. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/files/upload.rs +0 -0
  71. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/info.rs +0 -0
  72. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/issues/list.rs +0 -0
  73. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/issues/mod.rs +0 -0
  74. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/issues/mute.rs +0 -0
  75. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/issues/resolve.rs +0 -0
  76. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/issues/unresolve.rs +0 -0
  77. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/login.rs +0 -0
  78. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/logs/list.rs +0 -0
  79. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/logs/mod.rs +0 -0
  80. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/mod.rs +0 -0
  81. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/monitors/list.rs +0 -0
  82. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/monitors/mod.rs +0 -0
  83. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/monitors/run.rs +0 -0
  84. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/organizations/list.rs +0 -0
  85. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/organizations/mod.rs +0 -0
  86. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/projects/list.rs +0 -0
  87. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/projects/mod.rs +0 -0
  88. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/react_native/appcenter.rs +0 -0
  89. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/react_native/gradle.rs +0 -0
  90. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/react_native/mod.rs +0 -0
  91. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/react_native/xcode.rs +0 -0
  92. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/archive.rs +0 -0
  93. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/delete.rs +0 -0
  94. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/finalize.rs +0 -0
  95. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/info.rs +0 -0
  96. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/list.rs +0 -0
  97. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/mod.rs +0 -0
  98. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/new.rs +0 -0
  99. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/propose_version.rs +0 -0
  100. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/restore.rs +0 -0
  101. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/releases/set_commits.rs +0 -0
  102. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/repos/list.rs +0 -0
  103. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/repos/mod.rs +0 -0
  104. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_envelope.rs +0 -0
  105. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_event.rs +0 -0
  106. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/common_args.rs +0 -0
  107. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/distribution.rs +0 -0
  108. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/gauge.rs +0 -0
  109. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/increment.rs +0 -0
  110. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/mod.rs +0 -0
  111. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/send_metric/set.rs +0 -0
  112. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/sourcemaps/explain.rs +0 -0
  113. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/sourcemaps/inject.rs +0 -0
  114. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/sourcemaps/mod.rs +0 -0
  115. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/sourcemaps/resolve.rs +0 -0
  116. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/sourcemaps/upload.rs +0 -0
  117. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/uninstall.rs +0 -0
  118. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/update.rs +0 -0
  119. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/upload_dif.rs +0 -0
  120. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/upload_dsym.rs +0 -0
  121. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/commands/upload_proguard.rs +0 -0
  122. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/config.rs +0 -0
  123. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/constants.rs +0 -0
  124. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/main.rs +0 -0
  125. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/android.rs +0 -0
  126. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/appcenter.rs +0 -0
  127. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/args.rs +0 -0
  128. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/auth_token_impl.rs +0 -0
  129. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/error.rs +0 -0
  130. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/mod.rs +0 -0
  131. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/org_auth_token.rs +0 -0
  132. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/redacting.rs +0 -0
  133. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/test.rs +0 -0
  134. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/auth_token/user_auth_token.rs +0 -0
  135. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/build/apple.rs +0 -0
  136. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/build/mod.rs +0 -0
  137. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/build/normalize.rs +0 -0
  138. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/build/validation.rs +0 -0
  139. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/chunks/mod.rs +0 -0
  140. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/chunks/options.rs +0 -0
  141. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/chunks/types.rs +0 -0
  142. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/chunks/upload.rs +0 -0
  143. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/cordova.rs +0 -0
  144. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/dif.rs +0 -0
  145. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/dif_upload/error.rs +0 -0
  146. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/dif_upload/mod.rs +0 -0
  147. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/event.rs +0 -0
  148. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/file_search.rs +0 -0
  149. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/file_upload.rs +0 -0
  150. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/formatting.rs +0 -0
  151. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/fs.rs +0 -0
  152. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/http.rs +0 -0
  153. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/logging.rs +0 -0
  154. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/metrics.rs +0 -0
  155. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/mod.rs +0 -0
  156. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/non_empty.rs +0 -0
  157. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/progress.rs +0 -0
  158. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/proguard/mapping.rs +0 -0
  159. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/proguard/mod.rs +0 -0
  160. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/proguard/upload.rs +0 -0
  161. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/retry.rs +0 -0
  162. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_default_twenty.snap +0 -0
  163. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_ignore_missing.snap +0 -0
  164. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_base.snap +0 -0
  165. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_previous_commit.snap +0 -0
  166. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__get_commits_from_git.snap +0 -0
  167. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/source_bundle.rs +0 -0
  168. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/sourcemaps/inject.rs +0 -0
  169. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/sourcemaps.rs +0 -0
  170. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/system.rs +0 -0
  171. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/ui.rs +0 -0
  172. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/update.rs +0 -0
  173. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/value_parsers.rs +0 -0
  174. {sentry_cli-2.58.1 → sentry_cli-2.58.2}/src/utils/xcode.rs +0 -0
@@ -2726,7 +2726,7 @@ dependencies = [
2726
2726
 
2727
2727
  [[package]]
2728
2728
  name = "sentry-cli"
2729
- version = "2.58.1"
2729
+ version = "2.58.2"
2730
2730
  dependencies = [
2731
2731
  "anyhow",
2732
2732
  "anylog",
@@ -1,8 +1,7 @@
1
1
  [package]
2
- authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
3
2
  build = "build.rs"
4
3
  name = "sentry-cli"
5
- version = "2.58.1"
4
+ version = "2.58.2"
6
5
  edition = "2021"
7
6
  rust-version = "1.86"
8
7
 
@@ -63,7 +62,7 @@ sentry = { version = "0.34.0", default-features = false, features = [
63
62
  ] }
64
63
  serde = { version = "1.0.152", features = ["derive"] }
65
64
  serde_json = "1.0.93"
66
- sha1_smol = { version = "1.0.0", features = ["serde"] }
65
+ sha1_smol = { version = "1.0.0", features = ["serde", "std"] }
67
66
  sourcemap = { version = "9.2.0", features = ["ram_bundle"] }
68
67
  symbolic = { version = "12.13.3", features = ["debuginfo-serde", "il2cpp"] }
69
68
  thiserror = "1.0.38"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_cli
3
- Version: 2.58.1
3
+ Version: 2.58.2
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.1
3
+ Version: 2.58.2
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
@@ -11,23 +11,8 @@ pub struct ChunkedBuildRequest<'a> {
11
11
  pub build_configuration: Option<&'a str>,
12
12
  #[serde(skip_serializing_if = "Option::is_none")]
13
13
  pub release_notes: Option<&'a str>,
14
- // VCS fields
15
- #[serde(skip_serializing_if = "Option::is_none")]
16
- pub head_sha: Option<&'a str>,
17
- #[serde(skip_serializing_if = "Option::is_none")]
18
- pub base_sha: Option<&'a str>,
19
- #[serde(skip_serializing_if = "Option::is_none")]
20
- pub provider: Option<&'a str>,
21
- #[serde(skip_serializing_if = "Option::is_none")]
22
- pub head_repo_name: Option<&'a str>,
23
- #[serde(skip_serializing_if = "Option::is_none")]
24
- pub base_repo_name: Option<&'a str>,
25
- #[serde(skip_serializing_if = "Option::is_none")]
26
- pub head_ref: Option<&'a str>,
27
- #[serde(skip_serializing_if = "Option::is_none")]
28
- pub base_ref: Option<&'a str>,
29
- #[serde(skip_serializing_if = "Option::is_none")]
30
- pub pr_number: Option<&'a u32>,
14
+ #[serde(flatten)]
15
+ pub vcs_info: &'a VcsInfo<'a>,
31
16
  }
32
17
 
33
18
  #[derive(Debug, Deserialize)]
@@ -38,3 +23,24 @@ pub struct AssembleBuildResponse {
38
23
  pub detail: Option<String>,
39
24
  pub artifact_url: Option<String>,
40
25
  }
26
+
27
+ /// VCS information for build app uploads
28
+ #[derive(Debug, Serialize)]
29
+ pub struct VcsInfo<'a> {
30
+ #[serde(skip_serializing_if = "Option::is_none")]
31
+ pub head_sha: Option<Digest>,
32
+ #[serde(skip_serializing_if = "Option::is_none")]
33
+ pub base_sha: Option<Digest>,
34
+ #[serde(skip_serializing_if = "str::is_empty", rename = "provider")]
35
+ pub vcs_provider: &'a str,
36
+ #[serde(skip_serializing_if = "str::is_empty")]
37
+ pub head_repo_name: &'a str,
38
+ #[serde(skip_serializing_if = "str::is_empty")]
39
+ pub base_repo_name: &'a str,
40
+ #[serde(skip_serializing_if = "str::is_empty")]
41
+ pub head_ref: &'a str,
42
+ #[serde(skip_serializing_if = "str::is_empty")]
43
+ pub base_ref: &'a str,
44
+ #[serde(skip_serializing_if = "Option::is_none")]
45
+ pub pr_number: Option<&'a u32>,
46
+ }
@@ -10,7 +10,7 @@ mod hash_algorithm;
10
10
  mod upload;
11
11
 
12
12
  pub use self::artifact::{AssembleArtifactsResponse, ChunkedArtifactRequest};
13
- pub use self::build::{AssembleBuildResponse, ChunkedBuildRequest};
13
+ pub use self::build::{AssembleBuildResponse, ChunkedBuildRequest, VcsInfo};
14
14
  pub use self::compression::ChunkCompression;
15
15
  pub use self::dif::{AssembleDifsRequest, AssembleDifsResponse, ChunkedDifRequest};
16
16
  pub use self::file_state::ChunkedFileState;
@@ -2520,19 +2520,6 @@ struct LogsResponse {
2520
2520
  data: Vec<LogEntry>,
2521
2521
  }
2522
2522
 
2523
- /// VCS information for build app uploads
2524
- #[derive(Debug)]
2525
- pub struct VcsInfo<'a> {
2526
- pub head_sha: Option<&'a str>,
2527
- pub base_sha: Option<&'a str>,
2528
- pub vcs_provider: Option<&'a str>,
2529
- pub head_repo_name: Option<&'a str>,
2530
- pub base_repo_name: Option<&'a str>,
2531
- pub head_ref: Option<&'a str>,
2532
- pub base_ref: Option<&'a str>,
2533
- pub pr_number: Option<&'a u32>,
2534
- }
2535
-
2536
2523
  /// Log entry structure from the logs API
2537
2524
  #[derive(Debug, Deserialize, Clone)]
2538
2525
  pub struct LogEntry {
@@ -6,6 +6,7 @@ use anyhow::{anyhow, bail, Context as _, Result};
6
6
  use clap::{Arg, ArgAction, ArgMatches, Command};
7
7
  use indicatif::ProgressStyle;
8
8
  use log::{debug, info, warn};
9
+ use sha1_smol::Digest;
9
10
  use symbolic::common::ByteView;
10
11
  use zip::write::SimpleFileOptions;
11
12
  use zip::{DateTime, ZipWriter};
@@ -53,11 +54,13 @@ pub fn make_command(command: Command) -> Command {
53
54
  .arg(
54
55
  Arg::new("head_sha")
55
56
  .long("head-sha")
57
+ .value_parser(parse_sha_allow_empty)
56
58
  .help("The VCS commit sha to use for the upload. If not provided, the current commit sha will be used.")
57
59
  )
58
60
  .arg(
59
61
  Arg::new("base_sha")
60
62
  .long("base-sha")
63
+ .value_parser(parse_sha_allow_empty)
61
64
  .help("The VCS commit's base sha to use for the upload. If not provided, the merge-base of the current and remote branch will be used.")
62
65
  )
63
66
  .arg(
@@ -112,10 +115,10 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
112
115
  .expect("paths argument is required");
113
116
 
114
117
  let head_sha = matches
115
- .get_one("head_sha")
116
- .map(String::as_str)
117
- .map(Cow::Borrowed)
118
- .or_else(|| vcs::find_head_sha().ok().map(Cow::Owned));
118
+ .get_one::<Option<Digest>>("head_sha")
119
+ .map(|d| d.as_ref().cloned())
120
+ .or_else(|| Some(vcs::find_head_sha().ok()))
121
+ .flatten();
119
122
 
120
123
  let cached_remote = config.get_cached_vcs_remote();
121
124
  // Try to open the git repository and find the remote, but handle errors gracefully.
@@ -134,7 +137,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
134
137
  .as_ref()
135
138
  .map(|url| get_provider_from_remote(url))
136
139
  .map(Cow::Owned)
137
- });
140
+ })
141
+ .unwrap_or_default();
138
142
 
139
143
  let head_repo_name = matches
140
144
  .get_one("head_repo_name")
@@ -145,7 +149,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
145
149
  .as_ref()
146
150
  .map(|url| get_repo_from_remote_preserve_case(url))
147
151
  .map(Cow::Owned)
148
- });
152
+ })
153
+ .unwrap_or_default();
149
154
 
150
155
  let head_ref = matches
151
156
  .get_one("head_ref")
@@ -172,7 +177,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
172
177
  }
173
178
  })
174
179
  .map(Cow::Owned)
175
- });
180
+ })
181
+ .unwrap_or_default();
176
182
 
177
183
  let base_ref = matches
178
184
  .get_one("base_ref")
@@ -196,7 +202,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
196
202
  }
197
203
  })
198
204
  .map(Cow::Owned)
199
- });
205
+ })
206
+ .unwrap_or_default();
200
207
 
201
208
  let base_repo_name = matches
202
209
  .get_one("base_repo_name")
@@ -220,7 +227,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
220
227
  }
221
228
  })
222
229
  .map(Cow::Owned)
223
- });
230
+ })
231
+ .unwrap_or_default();
224
232
 
225
233
  (
226
234
  vcs_provider,
@@ -232,20 +240,21 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
232
240
  };
233
241
 
234
242
  // Track whether base_sha and base_ref were explicitly provided by the user
235
- let base_sha_from_user = matches.get_one::<String>("base_sha").is_some();
243
+ let base_sha_from_user = matches.get_one::<Option<Digest>>("base_sha").is_some();
236
244
  let base_ref_from_user = matches.get_one::<String>("base_ref").is_some();
237
245
 
238
246
  let mut base_sha = matches
239
- .get_one("base_sha")
240
- .map(String::as_str)
241
- .map(Cow::Borrowed)
247
+ .get_one::<Option<Digest>>("base_sha")
248
+ .map(|d| d.as_ref().cloned())
242
249
  .or_else(|| {
243
- vcs::find_base_sha(&cached_remote)
244
- .inspect_err(|e| debug!("Error finding base SHA: {e}"))
245
- .ok()
246
- .flatten()
247
- .map(Cow::Owned)
248
- });
250
+ Some(
251
+ vcs::find_base_sha(&cached_remote)
252
+ .inspect_err(|e| debug!("Error finding base SHA: {e}"))
253
+ .ok()
254
+ .flatten(),
255
+ )
256
+ })
257
+ .flatten();
249
258
 
250
259
  let mut base_ref = base_ref;
251
260
 
@@ -255,14 +264,14 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
255
264
  && !base_ref_from_user
256
265
  && base_sha.is_some()
257
266
  && head_sha.is_some()
258
- && base_sha.as_deref() == head_sha.as_deref()
267
+ && base_sha == head_sha
259
268
  {
260
269
  debug!(
261
270
  "Base SHA equals head SHA ({}), and both were auto-inferred. Skipping base_sha and base_ref, but keeping head_sha.",
262
- base_sha.as_deref().expect("base_sha is Some at this point")
271
+ base_sha.expect("base_sha is Some at this point")
263
272
  );
264
273
  base_sha = None;
265
- base_ref = None;
274
+ base_ref = "".into();
266
275
  }
267
276
  let pr_number = matches
268
277
  .get_one("pr_number")
@@ -325,13 +334,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
325
334
  info!("Uploading file: {}", path.display());
326
335
  let bytes = ByteView::open(zip.path())?;
327
336
  let vcs_info = VcsInfo {
328
- head_sha: head_sha.as_deref(),
329
- base_sha: base_sha.as_deref(),
330
- vcs_provider: vcs_provider.as_deref(),
331
- head_repo_name: head_repo_name.as_deref(),
332
- base_repo_name: base_repo_name.as_deref(),
333
- head_ref: head_ref.as_deref(),
334
- base_ref: base_ref.as_deref(),
337
+ head_sha,
338
+ base_sha,
339
+ vcs_provider: &vcs_provider,
340
+ head_repo_name: &head_repo_name,
341
+ base_repo_name: &base_repo_name,
342
+ head_ref: &head_ref,
343
+ base_ref: &base_ref,
335
344
  pr_number: pr_number.as_ref(),
336
345
  };
337
346
  match upload_file(
@@ -566,14 +575,7 @@ fn upload_file(
566
575
  chunks: &checksums,
567
576
  build_configuration,
568
577
  release_notes,
569
- head_sha: vcs_info.head_sha,
570
- base_sha: vcs_info.base_sha,
571
- provider: vcs_info.vcs_provider,
572
- head_repo_name: vcs_info.head_repo_name,
573
- base_repo_name: vcs_info.base_repo_name,
574
- head_ref: vcs_info.head_ref,
575
- base_ref: vcs_info.base_ref,
576
- pr_number: vcs_info.pr_number,
578
+ vcs_info,
577
579
  },
578
580
  )?;
579
581
  chunks.retain(|Chunk((digest, _))| response.missing_chunks.contains(digest));
@@ -605,6 +607,22 @@ fn upload_file(
605
607
  result
606
608
  }
607
609
 
610
+ /// Utility function to parse a SHA1 digest, allowing empty strings.
611
+ ///
612
+ /// Empty strings result in Ok(None), otherwise we return the parsed digest
613
+ /// or an error if the SHA is invalid.
614
+ fn parse_sha_allow_empty(sha: &str) -> Result<Option<Digest>> {
615
+ if sha.is_empty() {
616
+ return Ok(None);
617
+ }
618
+
619
+ let digest = sha
620
+ .parse()
621
+ .with_context(|| format!("{sha} is not a valid SHA1 digest"))?;
622
+
623
+ Ok(Some(digest))
624
+ }
625
+
608
626
  #[cfg(not(windows))]
609
627
  #[cfg(test)]
610
628
  mod tests {
@@ -160,7 +160,7 @@ pub fn detect_release_name() -> Result<String> {
160
160
 
161
161
  // finally try the git sha
162
162
  match vcs::find_head_sha() {
163
- Ok(head) => Ok(head),
163
+ Ok(head) => Ok(head.to_string()),
164
164
  Err(e) => Err(anyhow!(
165
165
  "Could not automatically determine release name:\n\t {e} \n\n\
166
166
  Please ensure your version control system is configured correctly, \
@@ -11,6 +11,7 @@ use lazy_static::lazy_static;
11
11
  use log::{debug, info, warn};
12
12
  use regex::Regex;
13
13
  use serde_json::Value;
14
+ use sha1_smol::Digest;
14
15
 
15
16
  use crate::api::{GitCommit, PatchSet, Ref, Repo};
16
17
 
@@ -550,7 +551,7 @@ fn find_matching_revs(
550
551
  Ok((prev_rev, rev))
551
552
  }
552
553
 
553
- pub fn find_head_sha() -> Result<String> {
554
+ pub fn find_head_sha() -> Result<Digest> {
554
555
  if let Some(pr_head_sha) = std::env::var("GITHUB_EVENT_PATH")
555
556
  .ok()
556
557
  .and_then(|event_path| std::fs::read_to_string(event_path).ok())
@@ -562,10 +563,14 @@ pub fn find_head_sha() -> Result<String> {
562
563
 
563
564
  let repo = git2::Repository::open_from_env()?;
564
565
  let head = repo.revparse_single("HEAD")?;
565
- Ok(head.id().to_string())
566
+ Ok(head
567
+ .id()
568
+ .to_string()
569
+ .parse()
570
+ .expect("Repo SHA should be a valid SHA1 digest"))
566
571
  }
567
572
 
568
- pub fn find_base_sha(remote_name: &str) -> Result<Option<String>> {
573
+ pub fn find_base_sha(remote_name: &str) -> Result<Option<Digest>> {
569
574
  if let Some(pr_base_sha) = std::env::var("GITHUB_EVENT_PATH")
570
575
  .ok()
571
576
  .and_then(|event_path| std::fs::read_to_string(event_path).ok())
@@ -587,7 +592,11 @@ pub fn find_base_sha(remote_name: &str) -> Result<Option<String>> {
587
592
  Ok(remote_ref
588
593
  .peel_to_commit()
589
594
  .and_then(|remote_commit| repo.merge_base(head_commit.id(), remote_commit.id()))
590
- .map(|oid| oid.to_string())
595
+ .map(|oid| {
596
+ oid.to_string()
597
+ .parse()
598
+ .expect("Repo SHA should be a valid SHA1 digest")
599
+ })
591
600
  .ok()
592
601
  .inspect(|sha| debug!("Found merge-base commit as base reference: {sha}")))
593
602
  }
@@ -595,7 +604,7 @@ pub fn find_base_sha(remote_name: &str) -> Result<Option<String>> {
595
604
  /// Extracts the PR head SHA from GitHub Actions event payload JSON.
596
605
  /// Returns None if not a PR event or if SHA cannot be extracted.
597
606
  /// Panics if json is malformed.
598
- fn extract_pr_head_sha_from_event(json_content: &str) -> Option<String> {
607
+ fn extract_pr_head_sha_from_event(json_content: &str) -> Option<Digest> {
599
608
  let v: Value = match serde_json::from_str(json_content) {
600
609
  Ok(v) => v,
601
610
  Err(_) => {
@@ -605,13 +614,13 @@ fn extract_pr_head_sha_from_event(json_content: &str) -> Option<String> {
605
614
 
606
615
  v.pointer("/pull_request/head/sha")
607
616
  .and_then(|s| s.as_str())
608
- .map(|s| s.to_owned())
617
+ .map(|s| s.parse().expect("GitHub Actions provided an invalid SHA"))
609
618
  }
610
619
 
611
620
  /// Extracts the PR base SHA from GitHub Actions event payload JSON.
612
621
  /// Returns None if not a PR event or if SHA cannot be extracted.
613
622
  /// Panics if json is malformed.
614
- fn extract_pr_base_sha_from_event(json_content: &str) -> Option<String> {
623
+ fn extract_pr_base_sha_from_event(json_content: &str) -> Option<Digest> {
615
624
  let v: Value = match serde_json::from_str(json_content) {
616
625
  Ok(v) => v,
617
626
  Err(_) => {
@@ -621,7 +630,7 @@ fn extract_pr_base_sha_from_event(json_content: &str) -> Option<String> {
621
630
 
622
631
  v.pointer("/pull_request/base/sha")
623
632
  .and_then(|s| s.as_str())
624
- .map(|s| s.to_owned())
633
+ .map(|s| s.parse().expect("GitHub Actions provided an invalid SHA"))
625
634
  }
626
635
 
627
636
  /// Given commit specs, repos and remote_name this returns a list of head
@@ -810,10 +819,7 @@ mod tests {
810
819
  crate::api::RepoProvider,
811
820
  insta::{assert_debug_snapshot, assert_yaml_snapshot},
812
821
  serial_test::serial,
813
- std::fs::File,
814
- std::io::Write as _,
815
- std::path::Path,
816
- std::process::Command,
822
+ std::{fs::File, io::Write as _, path::Path, process::Command},
817
823
  tempfile::{tempdir, TempDir},
818
824
  };
819
825
 
@@ -1600,7 +1606,7 @@ mod tests {
1600
1606
 
1601
1607
  assert_eq!(
1602
1608
  extract_pr_head_sha_from_event(&pr_json),
1603
- Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba5".to_owned())
1609
+ Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba5".parse().unwrap())
1604
1610
  );
1605
1611
 
1606
1612
  let push_json = r#"{
@@ -1642,7 +1648,7 @@ mod tests {
1642
1648
 
1643
1649
  assert_eq!(
1644
1650
  extract_pr_head_sha_from_event(real_gh_json),
1645
- Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba4".to_owned())
1651
+ Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba4".parse().unwrap())
1646
1652
  );
1647
1653
  let malicious_json = r#"{
1648
1654
  "action": "opened",
@@ -1658,20 +1664,23 @@ mod tests {
1658
1664
 
1659
1665
  assert_eq!(
1660
1666
  extract_pr_head_sha_from_event(malicious_json),
1661
- Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba5".to_owned())
1667
+ Some("19ef6adc4dbddf733db6e833e1f96fb056b6dba5".parse().unwrap())
1662
1668
  );
1663
- let any_sha_json = r#"{
1664
- "pull_request": {
1665
- "head": {
1666
- "sha": "invalid-sha-123"
1667
1669
  }
1668
- }
1669
- }"#;
1670
1670
 
1671
- assert_eq!(
1672
- extract_pr_head_sha_from_event(any_sha_json),
1673
- Some("invalid-sha-123".to_owned())
1674
- );
1671
+ #[test]
1672
+ #[should_panic]
1673
+ fn test_extract_pr_head_sha_from_event_invalid_sha() {
1674
+ let any_sha_json = serde_json::json!({
1675
+ "pull_request": {
1676
+ "head": {
1677
+ "sha": "invalid-sha-123"
1678
+ }
1679
+ }
1680
+ })
1681
+ .to_string();
1682
+
1683
+ extract_pr_head_sha_from_event(&any_sha_json);
1675
1684
  }
1676
1685
 
1677
1686
  #[test]
@@ -1710,7 +1719,10 @@ mod tests {
1710
1719
  std::env::remove_var("GITHUB_EVENT_PATH");
1711
1720
 
1712
1721
  assert!(result.is_ok());
1713
- assert_eq!(result.unwrap(), "19ef6adc4dbddf733db6e833e1f96fb056b6dba5");
1722
+ assert_eq!(
1723
+ result.unwrap(),
1724
+ "19ef6adc4dbddf733db6e833e1f96fb056b6dba5".parse().unwrap()
1725
+ );
1714
1726
  }
1715
1727
 
1716
1728
  #[test]
@@ -1734,7 +1746,7 @@ mod tests {
1734
1746
 
1735
1747
  assert_eq!(
1736
1748
  extract_pr_base_sha_from_event(&pr_json),
1737
- Some("55e6bc8c264ce95164314275d805f477650c440d".to_owned())
1749
+ Some("55e6bc8c264ce95164314275d805f477650c440d".parse().unwrap())
1738
1750
  );
1739
1751
 
1740
1752
  // Test with push event (should return None)
@@ -1790,7 +1802,7 @@ mod tests {
1790
1802
  let result = find_base_sha("origin");
1791
1803
  assert_eq!(
1792
1804
  result.unwrap().unwrap(),
1793
- "55e6bc8c264ce95164314275d805f477650c440d"
1805
+ "55e6bc8c264ce95164314275d805f477650c440d".parse().unwrap()
1794
1806
  );
1795
1807
 
1796
1808
  // Test without GITHUB_EVENT_PATH
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes