Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix: Add distinct set-commits release options
Add `SentrySetCommitReleaseOptions` to Sentry.targets that can be configured independently of `SentryReleaseOptions`, since it's possible for these to be conflicting.

Fixes #4108
  • Loading branch information
jamescrosswell committed Apr 14, 2025
commit 08bffc167794b0e728d7f0879ea867947f7588cc
5 changes: 4 additions & 1 deletion src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@

<SentryReleaseOptions Condition="'$(SentryOrg)' != ''">$(SentryReleaseOptions) --org $(SentryOrg)</SentryReleaseOptions>
<SentryReleaseOptions Condition="'$(SentryProject)' != ''">$(SentryReleaseOptions) --project $(SentryProject)</SentryReleaseOptions>

<SentrySetCommitOptions Condition="'$(SentrySetCommitOptions)' == ''">--auto</SentrySetCommitOptions>
<SentrySetCommitReleaseOptions Condition="'$(SentryOrg)' != ''">$(SentrySetCommitReleaseOptions) --org $(SentryOrg)</SentrySetCommitReleaseOptions>
<SentrySetCommitReleaseOptions Condition="'$(SentryProject)' != ''">$(SentrySetCommitReleaseOptions) --project $(SentryProject)</SentrySetCommitReleaseOptions>

<SentryCLIUploadOptions Condition="'$(SentryOrg)' != ''">$(SentryCLIUploadOptions) --org $(SentryOrg)</SentryCLIUploadOptions>
<SentryCLIUploadOptions Condition="'$(SentryProject)' != ''">$(SentryCLIUploadOptions) --project $(SentryProject)</SentryCLIUploadOptions>
Expand Down Expand Up @@ -350,7 +353,7 @@
Condition="'$(SentryCLI)' != '' and '$(SentrySetCommits)' == 'true'">
<Message Importance="High" Text="Setting Sentry commits" />
<Exec
Command="$(SentryCLIBaseCommand) releases set-commits $(SentrySetCommitOptions) $(_SentryRelease) $(SentryReleaseOptions)"
Command="$(SentryCLIBaseCommand) releases set-commits $(SentrySetCommitOptions) $(_SentryRelease) $(SentrySetCommitReleaseOptions)"
Copy link
Member

@Flash0ver Flash0ver Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Should we prefix this new property with _?

This property is not intended to be set by consuming projects, right?
And we also don't intend to mention this property in the documentation, do we?
Should we then prefix it with _ to communicate "internal use only)?

Copy link
Collaborator Author

@jamescrosswell jamescrosswell Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's supposed to be exposed to SDK users, same as the SentryReleaseOptions. It basically let's users specify whatever options they want (anything documented by sentry-cli releases set-commits --help).

For example they could put --ignore-missing in here.

IgnoreExitCode="true" ContinueOnError="WarnAndContinue">
<Output TaskParameter="ExitCode" PropertyName="_SentryCLIExitCode" />
</Exec>
Expand Down
Loading