Skip to content

Commit c558971

Browse files
Merge branch 'main' into fix/logs-public-dispose
2 parents 422aaec + 0405cb2 commit c558971

File tree

8 files changed

+52
-33
lines changed

8 files changed

+52
-33
lines changed

.github/actions/install-zstd/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ inputs:
88
description: 'zstd version'
99
required: false
1010
default: '1.5.7'
11+
checksum:
12+
description: 'zstd checksum'
13+
required: false
14+
default: 'acb4e8111511749dc7a3ebedca9b04190e37a17afeb73f55d4425dbf0b90fad9'
1115

1216
runs:
1317
using: composite
@@ -17,10 +21,16 @@ runs:
1721
shell: pwsh
1822
env:
1923
ZSTD_VERSION: ${{ inputs.version }}
24+
ZSTD_CHECKSUM: ${{ inputs.checksum }}
2025
run: |
2126
$url = "https://github.com/facebook/zstd/releases/download/v$env:ZSTD_VERSION/zstd-v$env:ZSTD_VERSION-win64.zip"
2227
$installDir = "$env:RUNNER_TOOL_CACHE\zstd-v$env:ZSTD_VERSION-win64"
2328
Invoke-WebRequest -OutFile "$env:TEMP\zstd.zip" -Uri $url
29+
$checksum = (Get-FileHash "$env:TEMP\zstd.zip" -Algorithm SHA256).Hash.ToLower()
30+
if ($checksum -ne $env:ZSTD_CHECKSUM) {
31+
Write-Error "zstd checksum verification failed. Expected: $env:ZSTD_CHECKSUM, Actual: $checksum"
32+
exit 1
33+
}
2434
Expand-Archive -Path "$env:TEMP\zstd.zip" -DestinationPath $env:RUNNER_TOOL_CACHE -Force
2535
echo "$installDir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
2636
& "$installDir\zstd.exe" --version

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
258258
- name: Fetch NuGet Packages
259259
if: env.CI_PUBLISHING_BUILD == 'true'
260-
uses: actions/download-artifact@v4
260+
uses: actions/download-artifact@v5
261261
with:
262262
name: ${{ github.sha }}
263263
path: src
@@ -338,7 +338,7 @@ jobs:
338338
uses: ./.github/actions/buildnative
339339

340340
- name: Fetch NuGet Packages
341-
uses: actions/download-artifact@v4
341+
uses: actions/download-artifact@v5
342342
with:
343343
name: ${{ github.sha }}
344344
path: src

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: ./.github/actions/environment
3636

3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # pin@v2
38+
uses: github/codeql-action/init@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # pin@v2
3939
with:
4040
languages: csharp
4141

@@ -49,6 +49,6 @@ jobs:
4949
run: dotnet build Sentry-CI-CodeQL.slnf --no-restore --nologo
5050

5151
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # pin@v2
52+
uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # pin@v2
5353
with:
5454
category: '/language:csharp'

.github/workflows/device-tests-android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ jobs:
7676
uses: actions/checkout@v4
7777

7878
- name: Download test app artifact
79-
uses: actions/download-artifact@v4
79+
uses: actions/download-artifact@v5
8080
with:
8181
name: device-test-android-${{ matrix.tfm }}
8282
path: bin
8383

8484
- name: Setup Gradle
85-
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v3
85+
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # pin@v3
8686

8787
# Cached AVD setup per https://github.com/ReactiveCircus/android-emulator-runner/blob/main/README.md
8888

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
### Fixes
66

77
- Crontabs now support day names (MON-SUN) and allow step values and ranges to be combined ([#4407](https://github.com/getsentry/sentry-dotnet/pull/4407))
8+
- Ensure the correct Sentry Cocoa SDK framework version is used on iOS ([#4411](https://github.com/getsentry/sentry-dotnet/pull/4411))
89
- Experimental _Structured Logs_:
910
- Remove `IDisposable` from `SentryStructuredLogger`. Disposal is intended through the owning `IHub` instance. ([#4424](https://github.com/getsentry/sentry-dotnet/pull/4424))
1011

1112
### Dependencies
1213

13-
- Bump CLI from v2.50.2 to v2.51.0 ([#4419](https://github.com/getsentry/sentry-dotnet/pull/4419))
14-
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2510)
15-
- [diff](https://github.com/getsentry/sentry-cli/compare/2.50.2...2.51.0)
14+
- Bump CLI from v2.50.2 to v2.51.1 ([#4419](https://github.com/getsentry/sentry-dotnet/pull/4419), [#4435](https://github.com/getsentry/sentry-dotnet/pull/4435))
15+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2511)
16+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.50.2...2.51.1)
1617

1718
## 5.14.0
1819

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
<!-- Set the version and local path for Sentry CLI (downloaded in the restore phase of Sentry.csproj) -->
8888
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
89-
<SentryCLIVersion>2.51.0</SentryCLIVersion>
89+
<SentryCLIVersion>2.51.1</SentryCLIVersion>
9090
<SentryCLIDirectory>$(MSBuildThisFileDirectory)tools\sentry-cli\$(SentryCLIVersion)\</SentryCLIDirectory>
9191
</PropertyGroup>
9292

src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<Description>.NET Bindings for the Sentry Cocoa SDK</Description>
1010
<SentryCocoaCache>..\..\modules\sentry-cocoa\</SentryCocoaCache>
1111
<SentryCocoaFrameworkHeaders>$(SentryCocoaCache)Sentry.framework\</SentryCocoaFrameworkHeaders>
12-
<SentryCocoaFramework>$(SentryCocoaCache)Sentry-Dynamic.xcframework</SentryCocoaFramework>
12+
<SentryCocoaProperties>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)../../modules/sentry-cocoa.properties"))</SentryCocoaProperties>
13+
<SentryCocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(SentryCocoaProperties), 'version\s*=\s*([^\s]+)').Groups[1].Value)</SentryCocoaVersion>
14+
<SentryCocoaFramework>$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework>
1315
</PropertyGroup>
1416

1517
<!-- Build empty assemblies when not on macOS, to pass the solution build. -->
@@ -46,44 +48,50 @@
4648
</ItemGroup>
4749

4850
<!-- Downloads and sets up the Cocoa SDK: dotnet msbuild /t:setupCocoaSDK src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj -->
49-
<Target Name="SetupCocoaSDK"
50-
Condition="$([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(SentryCocoaCache)Sentry-Dynamic.xcframework')"
51-
BeforeTargets="BeforeBuild">
52-
53-
<PropertyGroup>
54-
<PropertiesContent>$([System.IO.File]::ReadAllText("../../modules/sentry-cocoa.properties"))</PropertiesContent>
55-
<CocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(PropertiesContent), 'version\s*=\s*([^\s]+)').Groups[1].Value)</CocoaVersion>
56-
</PropertyGroup>
51+
<Target Name="_SetupCocoaSDK"
52+
Condition="$([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(SentryCocoaFramework)')">
5753

58-
<Message Importance="High" Text="Setting up the Cocoa SDK version '$(CocoaVersion)'." />
54+
<Message Importance="High" Text="Setting up the Cocoa SDK version '$(SentryCocoaVersion)'." />
5955

6056
<!-- Clean cache if version does not exist to get rid of old versions -->
6157
<RemoveDir
62-
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip')"
58+
Condition="!Exists('$(SentryCocoaFramework).zip')"
6359
Directories="$(SentryCocoaCache)" />
6460

6561
<!-- Create cache directory -->
6662
<MakeDir Condition="!Exists('$(SentryCocoaCache)')" Directories="$(SentryCocoaCache)" />
6763

6864
<!-- Download the Cocoa SDK as pre-built .xcframework -->
6965
<Exec
70-
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip')"
71-
Command="curl -L https://github.com/getsentry/sentry-cocoa/releases/download/$(CocoaVersion)/Sentry-Dynamic.xcframework.zip -o $(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip" />
66+
Condition="!Exists('$(SentryCocoaFramework).zip')"
67+
Command="curl -L https://github.com/getsentry/sentry-cocoa/releases/download/$(SentryCocoaVersion)/Sentry-Dynamic.xcframework.zip -o $(SentryCocoaFramework).zip" />
7268

7369
<Exec
74-
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic.xcframework')"
75-
Command="unzip -o $(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip -d $(SentryCocoaCache)" />
70+
Condition="Exists('$(SentryCocoaFramework).zip') and !Exists('$(SentryCocoaFramework)')"
71+
Command="unzip -o $(SentryCocoaFramework).zip -d $(SentryCocoaCache) &amp;&amp; mv $(SentryCocoaCache)Sentry-Dynamic.xcframework $(SentryCocoaFramework)" />
7672

7773
<!-- Make a copy of the header files before we butcher these to suite objective sharpie -->
7874
<MakeDir Directories="$(SentryCocoaFrameworkHeaders)" />
7975
<ItemGroup>
80-
<FilesToCopy Include="$(SentryCocoaCache)Sentry-Dynamic.xcframework\ios-arm64_arm64e\Sentry.framework\**\*" />
76+
<FilesToCopy Include="$(SentryCocoaFramework)\ios-arm64_arm64e\Sentry.framework\**\*" />
8177
</ItemGroup>
8278
<Copy SourceFiles="@(FilesToCopy)"
8379
DestinationFolder="$(SentryCocoaFrameworkHeaders)%(RecursiveDir)"
8480
SkipUnchangedFiles="true" />
8581
</Target>
8682

83+
<!-- Setup exactly once: https://learn.microsoft.com/visualstudio/msbuild/run-target-exactly-once -->
84+
<Target Name="SetupCocoaSDKBeforeOuterBuild" DependsOnTargets="_SetupCocoaSDK"
85+
Condition="$([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(SentryCocoaFramework)')"
86+
BeforeTargets="DispatchToInnerBuilds" />
87+
88+
<Target Name="SetupCocoaSDK"
89+
BeforeTargets="BeforeBuild"
90+
Condition="$([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(SentryCocoaFramework)')">
91+
<!-- Setup exactly once: https://learn.microsoft.com/visualstudio/msbuild/run-target-exactly-once -->
92+
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_SetupCocoaSDK" RemoveProperties="TargetFramework" />
93+
</Target>
94+
8795
<Target Name="CleanCocoaSDK" AfterTargets="Clean" Condition="$([MSBuild]::IsOSPlatform('OSX'))">
8896
<RemoveDir Directories="$(SentryCocoaCache)" ContinueOnError="true" />
8997
</Target>

src/Sentry/Sentry.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@
113113
<_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture>
114114
</PropertyGroup>
115115
<ItemGroup>
116-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Darwin-arm64" FileHash="0af55f783aa0c906fd33b2344f960cc8f90273f27503d6b23f1cbfceb6e69c43" />
117-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Darwin-x86_64" FileHash="da024b3b2db96dcdccf39fdfed351002a1d405a7b9780fc38574ebdee7115ddf" />
118-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Linux-aarch64" FileHash="6d7796308920458ee8c41f84b64e369e13214357924a10a5fcc1d5797cbca0f5" />
119-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Linux-i686" FileHash="e1a020db1a8f13dd72d4a3da906b5ce81c400112dc1b7852499d0d8f64d0232b" />
120-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Linux-x86_64" FileHash="507832f0f5066cb971119c2f4623b7adf32ee8013f4ffa90507ab93dbbcfc537" />
121-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Windows-i686.exe" FileHash="63d141ae349cf2d98a3930f9d4e6c19622232da506629190e5850c423baef1f4" />
122-
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) != 'X86')" Include="sentry-cli-Windows-x86_64.exe" FileHash="c32abbd511860369878b2f9a356d59488ca064d04a162755bf995d7a470e488c" />
116+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Darwin-arm64" FileHash="b96fe883990843a80fd5c11ec4b48431cdde4bbecd4e7355ebb7f1dafbf0f70c" />
117+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('OSX')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Darwin-x86_64" FileHash="ce9d725b446b77ced4f743da1892c9f752bfc825e87ed355503e16aff5d5948d" />
118+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'Arm64')" Include="sentry-cli-Linux-aarch64" FileHash="97906258835ea6f7f8f2fb1cd590572789494f03605c08ef51af45d4f6d3d211" />
119+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Linux-i686" FileHash="7735f2b9e42b9eb82014fc92923aa8c9a5a270ae591ecf6a6e0f817e029a8343" />
120+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Linux')) And $(_OSArchitecture) == 'X64')" Include="sentry-cli-Linux-x86_64" FileHash="ab4a2727699c6f06aaff83722bc7a10a1008f6a15e768ce132c80d7ebdd53216" />
121+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) == 'X86')" Include="sentry-cli-Windows-i686.exe" FileHash="217035d6e10c1541a0a3c8de5a9fe2bd310e32ae82937dc55c49122b56f12ceb" />
122+
<SentryCLIDownload Condition="'$(CI_PUBLISHING_BUILD)' == 'true' Or ($([MSBuild]::IsOSPlatform('Windows')) And $(_OSArchitecture) != 'X86')" Include="sentry-cli-Windows-x86_64.exe" FileHash="cb73854dd51fbb7ec54b594d4bf50ac114e9a6a9580e39fee21306430db149bc" />
123123
</ItemGroup>
124124

125125
<!-- Download the files -->

0 commit comments

Comments
 (0)