Skip to content
Merged
Changes from all commits
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
8 changes: 5 additions & 3 deletions src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<SentryProGuardUUID Condition="'$(SentryProGuardUUID)' == ''">$([System.Guid]::NewGuid())</SentryProGuardUUID>
<SentryAllowFailure Condition="'$(SENTRY_ALLOW_FAILURE)' == 'true'">true</SentryAllowFailure>
<SentryAllowFailure Condition="'$(SentryAllowFailure)' == ''">false</SentryAllowFailure>
<!-- From .NET 11 the SDK's Native AOT publish skips Build and runs _PublishOptimizedBuildAlternative instead -->
<_SentryAfterBuildTargets>Build;_PublishOptimizedBuildAlternative</_SentryAfterBuildTargets>
</PropertyGroup>

<Target Name="_SentryEnsureAndroidEnableAssemblyCompressionDisabled"
Expand Down Expand Up @@ -52,7 +54,7 @@
</WriteCodeFragment>
</Target>

<Target Name="CheckSentryCLI" AfterTargets="Build" Condition="'$(InnerTargets)' == ''">
<Target Name="CheckSentryCLI" AfterTargets="$(_SentryAfterBuildTargets)" Condition="'$(InnerTargets)' == ''">
<PropertyGroup>
<!-- Set defaults for the Sentry properties. -->
<SentryUploadSymbols Condition="'$(SentryUploadSymbols)' == ''">false</SentryUploadSymbols>
Expand Down Expand Up @@ -398,7 +400,7 @@
</Target>

<!-- Set release information after the build -->
<Target Name="_CreateSentryRelease" AfterTargets="Build" DependsOnTargets="_GetSentryRelease"
<Target Name="_CreateSentryRelease" AfterTargets="$(_SentryAfterBuildTargets)" DependsOnTargets="_GetSentryRelease"
Condition="'$(SentryCLI)' != '' and '$(SentryCreateRelease)' == 'true' and '$(_SentryRelease)' != ''">
<Message Importance="High" Text="Creating Sentry Release: $(_SentryRelease)" />
<Exec
Expand All @@ -409,7 +411,7 @@
</Target>

<!-- Send commit details to Sentry -->
<Target Name="_SentrySetCommits" AfterTargets="Build" DependsOnTargets="_CreateSentryRelease"
<Target Name="_SentrySetCommits" AfterTargets="$(_SentryAfterBuildTargets)" DependsOnTargets="_CreateSentryRelease"
Condition="'$(SentryCLI)' != '' and '$(SentrySetCommits)' == 'true' and '$(_SentryRelease)' != ''">
<Message Importance="High" Text="Setting Sentry commits" />
<Exec
Expand Down