sentry-cli 2.58.0__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.
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/Cargo.lock +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/Cargo.toml +3 -4
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/PKG-INFO +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/sentry_cli.egg-info/PKG-INFO +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/sentry_cli.egg-info/SOURCES.txt +1 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/build.rs +23 -17
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/mod.rs +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/mod.rs +3 -14
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/build/upload.rs +75 -34
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/bundle_jvm.rs +20 -39
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/find.rs +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/info.rs +3 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/login.rs +1 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/mod.rs +11 -2
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/upload_proguard.rs +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/config.rs +14 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/file_upload.rs +16 -219
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/mod.rs +1 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/releases.rs +1 -1
- sentry_cli-2.58.2/src/utils/source_bundle.rs +265 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/vcs.rs +40 -28
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/xcode.rs +1 -1
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/LICENSE +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/MANIFEST.in +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/README.md +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/Cargo.toml +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/build.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Package.swift +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/include/safeValueForKey.h +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/ObjcSupport/safeValueForKey.m +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/AssetCatalogParserTests.swift +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Info.plist +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/native/swift/AssetCatalogParser/Tests/AssetCatalogParserTests/Resources/test.xcarchive/Products/Applications/DemoApp.app/Assets.car +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/src/asset_catalog.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/apple-catalog-parsing/src/lib.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/build.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/pyproject.toml +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/sentry_cli.egg-info/dependency_links.txt +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/sentry_cli.egg-info/top_level.txt +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/setup.cfg +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/setup.py +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/connection_manager.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/artifact.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/compression.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/dif.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/file_state.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/capability.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/chunking/upload/options.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/deploy.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/data_types/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/encoding.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/envelopes_api.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/errors/api_error.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/errors/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/errors/sentry_error.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/api/pagination.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/bashsupport.sh +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/bash_hook.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/build/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/dart_symbol_map/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/dart_symbol_map/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/bundle_sources.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/check.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/print_sources.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/debug_files/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/deploys/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/deploys/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/deploys/new.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/derive_parser.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/events/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/events/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/files/delete.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/files/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/files/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/files/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/issues/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/issues/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/issues/mute.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/issues/resolve.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/issues/unresolve.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/logs/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/logs/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/monitors/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/monitors/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/monitors/run.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/organizations/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/organizations/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/projects/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/projects/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/react_native/appcenter.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/react_native/gradle.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/react_native/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/react_native/xcode.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/archive.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/delete.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/finalize.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/info.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/new.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/propose_version.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/restore.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/releases/set_commits.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/repos/list.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/repos/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_envelope.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_event.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/common_args.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/distribution.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/gauge.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/increment.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/send_metric/set.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/sourcemaps/explain.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/sourcemaps/inject.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/sourcemaps/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/sourcemaps/resolve.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/sourcemaps/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/uninstall.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/update.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/upload_dif.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/commands/upload_dsym.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/constants.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/main.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/android.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/appcenter.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/args.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/auth_token_impl.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/error.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/org_auth_token.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/redacting.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/test.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/auth_token/user_auth_token.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/build/apple.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/build/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/build/normalize.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/build/validation.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/chunks/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/chunks/options.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/chunks/types.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/chunks/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/cordova.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/dif.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/dif_upload/error.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/dif_upload/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/event.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/file_search.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/formatting.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/fs.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/http.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/logging.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/metrics.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/non_empty.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/progress.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/proguard/mapping.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/proguard/mod.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/proguard/upload.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/retry.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_default_twenty.snap +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_ignore_missing.snap +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_base.snap +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__generate_patch_set_previous_commit.snap +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/snapshots/sentry_cli__utils__vcs__tests__get_commits_from_git.snap +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/sourcemaps/inject.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/sourcemaps.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/system.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/ui.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/update.rs +0 -0
- {sentry_cli-2.58.0 → sentry_cli-2.58.2}/src/utils/value_parsers.rs +0 -0
|
@@ -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.
|
|
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"
|
|
@@ -99,8 +98,8 @@ with_crash_reporting = []
|
|
|
99
98
|
allow-attributes = "warn"
|
|
100
99
|
dbg-macro = "warn"
|
|
101
100
|
elidable-lifetime-names = "warn"
|
|
101
|
+
implicit-clone = "warn"
|
|
102
102
|
str-to-string = "warn"
|
|
103
|
-
string-to-string = "warn"
|
|
104
103
|
tests-outside-test-module = "warn"
|
|
105
104
|
unnecessary-wraps = "warn"
|
|
106
105
|
uninlined-format-args = "warn"
|
|
@@ -11,7 +11,7 @@ public func swift_inspect_asset_catalog(_ path: UnsafePointer<CChar>, outputPath
|
|
|
11
11
|
let pathString = String(cString: path)
|
|
12
12
|
let outputPathString = String(cString: outputPath)
|
|
13
13
|
if #available(macOS 13.0, *) {
|
|
14
|
-
let supportedVersions = [13, 14, 15]
|
|
14
|
+
let supportedVersions = [13, 14, 15, 26]
|
|
15
15
|
let version = ProcessInfo.processInfo.operatingSystemVersion
|
|
16
16
|
if supportedVersions.contains(version.majorVersion) {
|
|
17
17
|
AssetUtil.disect(file: URL(filePath: pathString), outputURL: URL(filePath: outputPathString))
|
|
@@ -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
|
-
|
|
15
|
-
|
|
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;
|
|
@@ -1411,6 +1411,7 @@ impl<'a> AuthenticatedApi<'a> {
|
|
|
1411
1411
|
region_url.ok().map(|url| url.into())
|
|
1412
1412
|
}
|
|
1413
1413
|
},
|
|
1414
|
+
#[expect(deprecated, reason = "Auth key is deprecated.")]
|
|
1414
1415
|
Auth::Key(_) => {
|
|
1415
1416
|
log::warn!(
|
|
1416
1417
|
"Auth key is not supported for region-specific API. Falling back to default region."
|
|
@@ -1771,9 +1772,10 @@ impl ApiRequest {
|
|
|
1771
1772
|
pub fn with_auth(mut self, auth: &Auth) -> ApiResult<Self> {
|
|
1772
1773
|
self.is_authenticated = true;
|
|
1773
1774
|
match *auth {
|
|
1775
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
1774
1776
|
Auth::Key(ref key) => {
|
|
1775
1777
|
self.handle.username(key)?;
|
|
1776
|
-
debug!("using key based authentication");
|
|
1778
|
+
debug!("using deprecated key based authentication");
|
|
1777
1779
|
Ok(self)
|
|
1778
1780
|
}
|
|
1779
1781
|
Auth::Token(ref token) => {
|
|
@@ -2518,19 +2520,6 @@ struct LogsResponse {
|
|
|
2518
2520
|
data: Vec<LogEntry>,
|
|
2519
2521
|
}
|
|
2520
2522
|
|
|
2521
|
-
/// VCS information for build app uploads
|
|
2522
|
-
#[derive(Debug)]
|
|
2523
|
-
pub struct VcsInfo<'a> {
|
|
2524
|
-
pub head_sha: Option<&'a str>,
|
|
2525
|
-
pub base_sha: Option<&'a str>,
|
|
2526
|
-
pub vcs_provider: Option<&'a str>,
|
|
2527
|
-
pub head_repo_name: Option<&'a str>,
|
|
2528
|
-
pub base_repo_name: Option<&'a str>,
|
|
2529
|
-
pub head_ref: Option<&'a str>,
|
|
2530
|
-
pub base_ref: Option<&'a str>,
|
|
2531
|
-
pub pr_number: Option<&'a u32>,
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
2523
|
/// Log entry structure from the logs API
|
|
2535
2524
|
#[derive(Debug, Deserialize, Clone)]
|
|
2536
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(
|
|
117
|
-
.
|
|
118
|
-
.
|
|
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,
|
|
@@ -230,17 +238,41 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
230
238
|
base_repo_name,
|
|
231
239
|
)
|
|
232
240
|
};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
241
|
+
|
|
242
|
+
// Track whether base_sha and base_ref were explicitly provided by the user
|
|
243
|
+
let base_sha_from_user = matches.get_one::<Option<Digest>>("base_sha").is_some();
|
|
244
|
+
let base_ref_from_user = matches.get_one::<String>("base_ref").is_some();
|
|
245
|
+
|
|
246
|
+
let mut base_sha = matches
|
|
247
|
+
.get_one::<Option<Digest>>("base_sha")
|
|
248
|
+
.map(|d| d.as_ref().cloned())
|
|
237
249
|
.or_else(|| {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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();
|
|
258
|
+
|
|
259
|
+
let mut base_ref = base_ref;
|
|
260
|
+
|
|
261
|
+
// If base_sha equals head_sha and both were auto-inferred, skip setting base_sha and base_ref
|
|
262
|
+
// but keep head_sha (since comparing a commit to itself provides no meaningful baseline)
|
|
263
|
+
if !base_sha_from_user
|
|
264
|
+
&& !base_ref_from_user
|
|
265
|
+
&& base_sha.is_some()
|
|
266
|
+
&& head_sha.is_some()
|
|
267
|
+
&& base_sha == head_sha
|
|
268
|
+
{
|
|
269
|
+
debug!(
|
|
270
|
+
"Base SHA equals head SHA ({}), and both were auto-inferred. Skipping base_sha and base_ref, but keeping head_sha.",
|
|
271
|
+
base_sha.expect("base_sha is Some at this point")
|
|
272
|
+
);
|
|
273
|
+
base_sha = None;
|
|
274
|
+
base_ref = "".into();
|
|
275
|
+
}
|
|
244
276
|
let pr_number = matches
|
|
245
277
|
.get_one("pr_number")
|
|
246
278
|
.copied()
|
|
@@ -302,13 +334,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
302
334
|
info!("Uploading file: {}", path.display());
|
|
303
335
|
let bytes = ByteView::open(zip.path())?;
|
|
304
336
|
let vcs_info = VcsInfo {
|
|
305
|
-
head_sha
|
|
306
|
-
base_sha
|
|
307
|
-
vcs_provider: vcs_provider
|
|
308
|
-
head_repo_name: head_repo_name
|
|
309
|
-
base_repo_name: base_repo_name
|
|
310
|
-
head_ref: head_ref
|
|
311
|
-
base_ref: base_ref
|
|
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,
|
|
312
344
|
pr_number: pr_number.as_ref(),
|
|
313
345
|
};
|
|
314
346
|
match upload_file(
|
|
@@ -543,14 +575,7 @@ fn upload_file(
|
|
|
543
575
|
chunks: &checksums,
|
|
544
576
|
build_configuration,
|
|
545
577
|
release_notes,
|
|
546
|
-
|
|
547
|
-
base_sha: vcs_info.base_sha,
|
|
548
|
-
provider: vcs_info.vcs_provider,
|
|
549
|
-
head_repo_name: vcs_info.head_repo_name,
|
|
550
|
-
base_repo_name: vcs_info.base_repo_name,
|
|
551
|
-
head_ref: vcs_info.head_ref,
|
|
552
|
-
base_ref: vcs_info.base_ref,
|
|
553
|
-
pr_number: vcs_info.pr_number,
|
|
578
|
+
vcs_info,
|
|
554
579
|
},
|
|
555
580
|
)?;
|
|
556
581
|
chunks.retain(|Chunk((digest, _))| response.missing_chunks.contains(digest));
|
|
@@ -582,6 +607,22 @@ fn upload_file(
|
|
|
582
607
|
result
|
|
583
608
|
}
|
|
584
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
|
+
|
|
585
626
|
#[cfg(not(windows))]
|
|
586
627
|
#[cfg(test)]
|
|
587
628
|
mod tests {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#![expect(clippy::unwrap_used, reason = "contains legacy code which uses unwrap")]
|
|
2
2
|
|
|
3
|
-
use crate::api::Api;
|
|
4
3
|
use crate::config::Config;
|
|
5
|
-
use crate::constants::DEFAULT_MAX_WAIT;
|
|
6
4
|
use crate::utils::args::ArgExt as _;
|
|
7
5
|
use crate::utils::file_search::ReleaseFileSearch;
|
|
8
|
-
use crate::utils::file_upload::
|
|
6
|
+
use crate::utils::file_upload::SourceFile;
|
|
9
7
|
use crate::utils::fs::path_as_url;
|
|
8
|
+
use crate::utils::source_bundle::{self, BundleContext};
|
|
10
9
|
use anyhow::{bail, Context as _, Result};
|
|
11
10
|
use clap::{Arg, ArgMatches, Command};
|
|
12
11
|
use sentry::types::DebugId;
|
|
@@ -54,19 +53,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
54
53
|
let config = Config::current();
|
|
55
54
|
let org = config.get_org(matches)?;
|
|
56
55
|
let project = config.get_project(matches).ok();
|
|
57
|
-
let api = Api::current();
|
|
58
|
-
let chunk_upload_options = api.authenticated()?.get_chunk_upload_options(&org)?;
|
|
59
56
|
|
|
60
|
-
let context = &
|
|
61
|
-
org: &org,
|
|
62
|
-
projects: project.as_slice().try_into().ok(),
|
|
63
|
-
release: None,
|
|
64
|
-
dist: None,
|
|
65
|
-
note: None,
|
|
66
|
-
wait: true,
|
|
67
|
-
max_wait: DEFAULT_MAX_WAIT,
|
|
68
|
-
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
69
|
-
};
|
|
57
|
+
let context = BundleContext::new(&org).with_projects(project.as_slice());
|
|
70
58
|
let path = matches.get_one::<PathBuf>("path").unwrap();
|
|
71
59
|
let output_path = matches.get_one::<PathBuf>("output").unwrap();
|
|
72
60
|
let debug_id = matches.get_one::<DebugId>("debug_id").unwrap();
|
|
@@ -87,31 +75,24 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
87
75
|
))?;
|
|
88
76
|
}
|
|
89
77
|
|
|
90
|
-
let sources = ReleaseFileSearch::new(path.
|
|
91
|
-
let files = sources
|
|
92
|
-
.
|
|
93
|
-
.
|
|
94
|
-
|
|
95
|
-
let local_path_jvm_ext = local_path.with_extension("jvm");
|
|
96
|
-
let url = format!("~/{}", path_as_url(&local_path_jvm_ext));
|
|
97
|
-
(
|
|
98
|
-
url.clone(),
|
|
99
|
-
SourceFile {
|
|
100
|
-
url,
|
|
101
|
-
path: source.path.clone(),
|
|
102
|
-
contents: Arc::new(source.contents.clone()),
|
|
103
|
-
ty: SourceFileType::Source,
|
|
104
|
-
headers: BTreeMap::new(),
|
|
105
|
-
messages: vec![],
|
|
106
|
-
already_uploaded: false,
|
|
107
|
-
},
|
|
108
|
-
)
|
|
109
|
-
})
|
|
110
|
-
.collect();
|
|
78
|
+
let sources = ReleaseFileSearch::new(path.clone()).collect_files()?;
|
|
79
|
+
let files = sources.iter().map(|source| {
|
|
80
|
+
let local_path = source.path.strip_prefix(&source.base_path).unwrap();
|
|
81
|
+
let local_path_jvm_ext = local_path.with_extension("jvm");
|
|
82
|
+
let url = format!("~/{}", path_as_url(&local_path_jvm_ext));
|
|
111
83
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
84
|
+
SourceFile {
|
|
85
|
+
url,
|
|
86
|
+
path: source.path.clone(),
|
|
87
|
+
contents: Arc::new(source.contents.clone()),
|
|
88
|
+
ty: SourceFileType::Source,
|
|
89
|
+
headers: BTreeMap::new(),
|
|
90
|
+
messages: vec![],
|
|
91
|
+
already_uploaded: false,
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
let tempfile = source_bundle::build(context, files, Some(*debug_id))
|
|
115
96
|
.context("Unable to create source bundle")?;
|
|
116
97
|
|
|
117
98
|
fs::copy(tempfile.path(), &out).context("Unable to write source bundle")?;
|
|
@@ -59,7 +59,8 @@ fn describe_auth(auth: Option<&Auth>) -> &str {
|
|
|
59
59
|
match auth {
|
|
60
60
|
None => "Unauthorized",
|
|
61
61
|
Some(&Auth::Token(_)) => "Auth Token",
|
|
62
|
-
|
|
62
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
63
|
+
Some(&Auth::Key(_)) => "API Key (deprecated)",
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -74,6 +75,7 @@ fn get_config_status_json() -> Result<()> {
|
|
|
74
75
|
|
|
75
76
|
rv.auth.auth_type = config.get_auth().map(|val| match val {
|
|
76
77
|
Auth::Token(_) => "token".into(),
|
|
78
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
77
79
|
Auth::Key(_) => "api_key".into(),
|
|
78
80
|
});
|
|
79
81
|
rv.auth.successful =
|
|
@@ -140,6 +140,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
140
140
|
fn get_org_from_auth(auth: &Auth) -> Option<&str> {
|
|
141
141
|
match auth {
|
|
142
142
|
Auth::Token(token) => get_org_from_token(token),
|
|
143
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
143
144
|
Auth::Key(_) => None,
|
|
144
145
|
}
|
|
145
146
|
}
|
|
@@ -138,7 +138,15 @@ fn preexecute_hooks() -> Result<bool> {
|
|
|
138
138
|
|
|
139
139
|
fn configure_args(config: &mut Config, matches: &ArgMatches) {
|
|
140
140
|
if let Some(api_key) = matches.get_one::<String>("api_key") {
|
|
141
|
-
|
|
141
|
+
log::warn!(
|
|
142
|
+
"[DEPRECTATION NOTICE] API key authentication and the --api-key argument are \
|
|
143
|
+
deprecated. \
|
|
144
|
+
Please generate an auth token, and use the --auth-token argument instead."
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
#[expect(deprecated, reason = "Auth key is deprecated.")]
|
|
148
|
+
let auth = Auth::Key(api_key.to_owned());
|
|
149
|
+
config.set_auth(auth);
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
if let Some(auth_token) = matches.get_one::<AuthToken>("auth_token") {
|
|
@@ -188,7 +196,8 @@ fn app() -> Command {
|
|
|
188
196
|
Arg::new("api_key")
|
|
189
197
|
.value_name("API_KEY")
|
|
190
198
|
.long("api-key")
|
|
191
|
-
.
|
|
199
|
+
.hide(true)
|
|
200
|
+
.help("[DEPRECATED] Use the given Sentry API key."),
|
|
192
201
|
)
|
|
193
202
|
.arg(
|
|
194
203
|
Arg::new("log_level")
|
|
@@ -36,6 +36,7 @@ const MAX_RETRIES_INI_KEY: &str = "max_retries";
|
|
|
36
36
|
/// Represents the auth information
|
|
37
37
|
#[derive(Debug, Clone)]
|
|
38
38
|
pub enum Auth {
|
|
39
|
+
#[deprecated(note = "Auth Key authentication is deprecated.")]
|
|
39
40
|
Key(String),
|
|
40
41
|
Token(AuthToken),
|
|
41
42
|
}
|
|
@@ -196,6 +197,7 @@ impl Config {
|
|
|
196
197
|
val.raw().expose_secret().clone(),
|
|
197
198
|
);
|
|
198
199
|
}
|
|
200
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
199
201
|
Some(Auth::Key(ref val)) => {
|
|
200
202
|
self.ini.set_to(Some("auth"), "api_key".into(), val.clone());
|
|
201
203
|
}
|
|
@@ -734,15 +736,26 @@ impl Clone for Config {
|
|
|
734
736
|
}
|
|
735
737
|
}
|
|
736
738
|
|
|
737
|
-
#[expect(clippy::manual_map)]
|
|
738
739
|
fn get_default_auth(ini: &Ini) -> Option<Auth> {
|
|
739
740
|
if let Ok(val) = env::var("SENTRY_AUTH_TOKEN") {
|
|
740
741
|
Some(Auth::Token(val.into()))
|
|
741
742
|
} else if let Ok(val) = env::var("SENTRY_API_KEY") {
|
|
743
|
+
log::warn!(
|
|
744
|
+
"[DEPRECTATION NOTICE] API key authentication and the `SENTRY_API_KEY` environment \
|
|
745
|
+
variable are deprecated. \
|
|
746
|
+
Please generate and set an auth token using `SENTRY_AUTH_TOKEN` instead."
|
|
747
|
+
);
|
|
748
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
742
749
|
Some(Auth::Key(val))
|
|
743
750
|
} else if let Some(val) = ini.get_from(Some("auth"), "token") {
|
|
744
751
|
Some(Auth::Token(val.into()))
|
|
745
752
|
} else if let Some(val) = ini.get_from(Some("auth"), "api_key") {
|
|
753
|
+
log::warn!(
|
|
754
|
+
"[DEPRECTATION NOTICE] API key authentication and the `api_key` field in the \
|
|
755
|
+
Sentry CLI config file are deprecated. \
|
|
756
|
+
Please generate and set an auth token instead."
|
|
757
|
+
);
|
|
758
|
+
#[expect(deprecated, reason = "API key is deprecated.")]
|
|
746
759
|
Some(Auth::Key(val.to_owned()))
|
|
747
760
|
} else {
|
|
748
761
|
None
|