-
-
Notifications
You must be signed in to change notification settings - Fork 221
fix: Clean repo builds no longer fail when building native #4366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4681b09
f66d4a3
70ee69d
36ca089
94e0293
ad6087f
b4effe3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<SentryNativeSourceDirectory>..\..\modules\sentry-native\</SentryNativeSourceDirectory> | ||
<SentryNativeSourceDirectory>$(MSBuildThisFileDirectory)..\..\..\..\modules\sentry-native\</SentryNativeSourceDirectory> | ||
<SentryNativeLibraryName>sentry-native</SentryNativeLibraryName> | ||
<SentryNativeBuildScript>../../scripts/build-sentry-native.ps1</SentryNativeBuildScript> | ||
<SentryNativeBuildInputs>../../.git/modules/modules/sentry-native/HEAD;$(MSBuildThisFileDirectory)Sentry.Native.targets;$(SentryNativeBuildScript)</SentryNativeBuildInputs> | ||
<SentryNativeBuildScript>$(MSBuildThisFileDirectory)..\..\..\..\scripts\build-sentry-native.ps1</SentryNativeBuildScript> | ||
<SentryNativeBuildInputs>$(MSBuildThisFileDirectory)..\..\..\..\.git\modules\modules\sentry-native/HEAD;$(MSBuildThisFileDirectory)Sentry.Native.targets;$(SentryNativeBuildScript)</SentryNativeBuildInputs> | ||
<SentryNativeOutputDirectory>$(MSBuildThisFileDirectory)sentry-native\</SentryNativeOutputDirectory> | ||
<!-- List of runtime identifiers: https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json --> | ||
<NativeLibRelativePath-win-x64>win-x64</NativeLibRelativePath-win-x64> | ||
|
@@ -85,11 +85,25 @@ | |
<!-- Build the Sentry Native SDK (this only runs on local machines because in CI we expect the SDK to be | ||
built already on each native platform and fetched for the final .net build. --> | ||
<Target Name="_BuildSentryNativeSDK" | ||
BeforeTargets="DispatchToInnerBuilds;BeforeBuild" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "when" now gets resolved by this target being "clamped" by the two new ones. |
||
Condition="'$(_SentryIsNet8OrGreater)' == 'true' and '$(CI)' != 'true'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition needs to be added to the new one's as |
||
Inputs="$(SentryNativeBuildInputs)" | ||
Outputs="$(SentryNativeBuildOutputs)"> | ||
<!-- We want a "-Clean" because if the build script changes, previous cmake cache may contain invalid defines. --> | ||
<Exec Command="pwsh $(SentryNativeBuildScript) -Clean" /> | ||
</Target> | ||
|
||
<!-- We want to build the sentry-native only once, BEFORE building TFM specific verions of the SDK --> | ||
<!-- How to run a target exactly once: https://learn.microsoft.com/visualstudio/msbuild/run-target-exactly-once--> | ||
<Target Name="_BuildSentryNativeSDKBeforeOuterBuild" | ||
Condition="'$(_SentryIsNet8OrGreater)' == 'true' and '$(CI)' != 'true'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to keep the condition on the "outer" target as the TF gets removed on line |
||
DependsOnTargets="_BuildSentryNativeSDK" | ||
BeforeTargets="DispatchToInnerBuilds"> | ||
</Target> | ||
|
||
<Target Name="_BuildSentryNativeSDKBeforeInnerBuild" | ||
Condition="'$(_SentryIsNet8OrGreater)' == 'true' and '$(CI)' != 'true'" | ||
BeforeTargets="BeforeBuild"> | ||
<MSBuild Projects="$(MSBuildProjectFullPath)" | ||
Targets="_BuildSentryNativeSDK" | ||
RemoveProperties="TargetFramework" /> | ||
</Target> | ||
</Project> |
Uh oh!
There was an error while loading. Please reload this page.