|
9 | 9 | <Description>.NET Bindings for the Sentry Cocoa SDK</Description> |
10 | 10 | <SentryCocoaCache>..\..\modules\sentry-cocoa\</SentryCocoaCache> |
11 | 11 | <SentryCocoaFrameworkHeaders>$(SentryCocoaCache)Sentry.framework\</SentryCocoaFrameworkHeaders> |
| 12 | + <!-- SentrySpan.g.cs: error CS0108: 'ISentrySpan.Serialize()' hides inherited member 'ISentrySerializable.Serialize()'. Use the new keyword if hiding was intended --> |
| 13 | + <NoWarn>$(NoWarn);CS0108</NoWarn> |
| 14 | + </PropertyGroup> |
| 15 | + |
| 16 | + <!-- Released Cocoa SDK builds --> |
| 17 | + <PropertyGroup Condition="!Exists('$(SentryCocoaCache).git')"> |
12 | 18 | <SentryCocoaProperties>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)../../modules/sentry-cocoa.properties"))</SentryCocoaProperties> |
13 | 19 | <SentryCocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(SentryCocoaProperties), 'version\s*=\s*([^\s]+)').Groups[1].Value)</SentryCocoaVersion> |
14 | 20 | <SentryCocoaFramework>$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework> |
15 | 21 | <SentryCocoaBindingInputs>../../modules/sentry-cocoa.properties;../../scripts/generate-cocoa-bindings.ps1;$(SentryCocoaFrameworkHeaders)**/*.h</SentryCocoaBindingInputs> |
16 | | - <!-- SentrySpan.g.cs: error CS0108: 'ISentrySpan.Serialize()' hides inherited member 'ISentrySerializable.Serialize()'. Use the new keyword if hiding was intended --> |
17 | | - <NoWarn>$(NoWarn);CS0108</NoWarn> |
18 | 22 | </PropertyGroup> |
19 | 23 |
|
20 | 24 | <!-- Override values for local Cocoa SDK builds --> |
21 | 25 | <PropertyGroup Condition="Exists('$(SentryCocoaCache).git')"> |
22 | 26 | <SentryCocoaFramework>$(SentryCocoaCache)Carthage\Build-$(TargetPlatformIdentifier)\Sentry.xcframework</SentryCocoaFramework> |
23 | 27 | <SentryCocoaBindingInputs>../../scripts/generate-cocoa-bindings.ps1;$(SentryCocoaCache)Carthage/.built-from-sha;$(SentryCocoaCache)Carthage/**/*.h</SentryCocoaBindingInputs> |
| 28 | + <!-- Resolve path to modules/sentry-cocoa/.git --> |
| 29 | + <SentryCocoaGitFile>$([MSBuild]::NormalizePath($(MSBuildThisFileDirectory), $(SentryCocoaCache).git))</SentryCocoaGitFile> |
| 30 | + <!-- Standalone clone: .git is a directory --> |
| 31 | + <SentryCocoaGitDir Condition="Exists('$(SentryCocoaCache).git\HEAD')">.git</SentryCocoaGitDir> |
| 32 | + <!-- Submodule: .git is a file pointing at the real gitdir --> |
| 33 | + <SentryCocoaGitDir Condition="'$(SentryCocoaGitDir)' == ''">$([System.IO.File]::ReadAllText('$(SentryCocoaGitFile)').Trim().Replace('gitdir: ', ''))</SentryCocoaGitDir> |
24 | 34 | </PropertyGroup> |
25 | 35 |
|
26 | 36 | <!-- Build empty assemblies when not on macOS, to pass the solution build. --> |
|
97 | 107 | <!-- Build the Sentry Cocoa SDK from source --> |
98 | 108 | <Target Name="_BuildCocoaSDK" |
99 | 109 | Condition="$([MSBuild]::IsOSPlatform('OSX')) And Exists('$(SentryCocoaCache).git')" |
100 | | - Inputs="..\..\modules\sentry-cocoa\.git\HEAD;..\..\scripts\build-sentry-cocoa.sh" Outputs="..\..\modules\sentry-cocoa\Carthage\.built-from-sha"> |
| 110 | + Inputs="$(SentryCocoaCache)$(SentryCocoaGitDir)\HEAD;..\..\scripts\build-sentry-cocoa.sh" Outputs="..\..\modules\sentry-cocoa\Carthage\.built-from-sha"> |
101 | 111 |
|
102 | 112 | <Message Importance="High" Text="Building the Cocoa SDK from source." /> |
103 | 113 | <Exec Command="bash ../../scripts/build-sentry-cocoa.sh" IgnoreStandardErrorWarningFormat="true" /> |
|
125 | 135 | Condition="$([MSBuild]::IsOSPlatform('OSX'))" /> |
126 | 136 |
|
127 | 137 | <Target Name="CleanCocoaSDK" AfterTargets="Clean" Condition="$([MSBuild]::IsOSPlatform('OSX'))"> |
128 | | - <RemoveDir Directories="$(SentryCocoaCache)" ContinueOnError="true" /> |
| 138 | + <RemoveDir Directories="$(SentryCocoaCache)Carthage;$(SentryCocoaFramework);$(SentryCocoaFrameworkHeaders)" ContinueOnError="true" /> |
| 139 | + <Delete Files="$(SentryCocoaFramework).zip;$(SentryCocoaFramework).sanitized.stamp" ContinueOnError="true" /> |
129 | 140 | </Target> |
130 | 141 |
|
131 | 142 | <!-- Generate bindings --> |
|
0 commit comments