From f964fe757e9657b7612b042e60095252830ac5ec Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 9 Jan 2025 03:17:04 +0000 Subject: [PATCH 1/4] chore: update dependencies/Sentry.properties to 5.0.1 --- CHANGELOG.md | 6 +++--- dependencies/Sentry.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e39921f..e8b0279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ ### Dependencies -- Bump Dotnet SDK from v4.12.1 to v4.13.0 ([#69](https://github.com/getsentry/sentry-powershell/pull/69)) - - [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#4130) - - [diff](https://github.com/getsentry/sentry-dotnet/compare/4.12.1...4.13.0) +- Bump Dotnet SDK from v4.12.1 to v5.0.1 ([#69](https://github.com/getsentry/sentry-powershell/pull/69), [#71](https://github.com/getsentry/sentry-powershell/pull/71)) + - [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#501) + - [diff](https://github.com/getsentry/sentry-dotnet/compare/4.12.1...5.0.1) ## 0.2.0 diff --git a/dependencies/Sentry.properties b/dependencies/Sentry.properties index 7b48a91..3a779e1 100644 --- a/dependencies/Sentry.properties +++ b/dependencies/Sentry.properties @@ -1,3 +1,3 @@ -version = 4.13.0 +version = 5.0.1 repo = https://github.com/getsentry/sentry-dotnet license = MIT From 25f1d5b8909e6f38a82429d4ed3f7753f99dde20 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Thu, 23 Jan 2025 09:43:54 +0100 Subject: [PATCH 2/4] chore: update download.ps1 --- dependencies/download.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies/download.ps1 b/dependencies/download.ps1 index e052cc9..c843dd6 100644 --- a/dependencies/download.ps1 +++ b/dependencies/download.ps1 @@ -110,7 +110,7 @@ function Download([string] $dependency, [string] $TFM, [string] $targetTFM = $nu } Download -Dependency 'Sentry' -TFM 'net8.0' -Download -Dependency 'Sentry' -TFM 'net6.0' +Download -Dependency 'Sentry' -TFM 'net8.0' Download -Dependency 'Sentry' -TFM 'net462' # You can see the list of dependencies that are actually used in sentry-dotnet/src/Sentry/bin/Debug/net462 From 647ba34a76f3737b2771dade755335d1c5b5759c Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Thu, 23 Jan 2025 09:51:03 +0100 Subject: [PATCH 3/4] remove net6 sentry-dotnet --- dependencies/download.ps1 | 1 - modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 | 4 ---- 2 files changed, 5 deletions(-) diff --git a/dependencies/download.ps1 b/dependencies/download.ps1 index c843dd6..9390ced 100644 --- a/dependencies/download.ps1 +++ b/dependencies/download.ps1 @@ -109,7 +109,6 @@ function Download([string] $dependency, [string] $TFM, [string] $targetTFM = $nu $assemblyVersion | Out-File -NoNewline $targetVersionFile } -Download -Dependency 'Sentry' -TFM 'net8.0' Download -Dependency 'Sentry' -TFM 'net8.0' Download -Dependency 'Sentry' -TFM 'net462' diff --git a/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 b/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 index f672eac..4c2ee65 100644 --- a/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 +++ b/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 @@ -13,10 +13,6 @@ function GetTFM { return 'net8.0' } - elseif ($PSVersionTable.PSVersion -ge '7.2') - { - return 'net6.0' - } else { return 'net462' From a3f0379ffd7b35bcdd9a4efb728950da031405c6 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Thu, 23 Jan 2025 10:32:14 +0100 Subject: [PATCH 4/4] drop support for pwsh 7.2 and 7.3 --- .github/workflows/build.yml | 2 -- README.md | 2 +- modules/Sentry/Sentry.psm1 | 5 +---- modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 | 5 +++-- tests/integration.tests.ps1 | 3 +-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9fefa6..be6d977 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,8 +41,6 @@ jobs: shell: [pwsh] version: - '7.4.0' - - '7.3.0' - - '7.2.0' # And test all built-in PowerShell/Windows Powershell versions on latest CI runner images include: - os: ubuntu diff --git a/README.md b/README.md index b285b70..3a0ce4f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Although the underlying .NET SDK is proven in production, the PowerShell Sentry The PowerShell Sentry SDK is tested to work with: - Windows PowerShell 5.1 -- PowerShell 7.2+ on Windows, macOS, and Linux +- PowerShell 7.4+ on Windows, macOS, and Linux ## Documentation diff --git a/modules/Sentry/Sentry.psm1 b/modules/Sentry/Sentry.psm1 index 223ee85..595b59d 100644 --- a/modules/Sentry/Sentry.psm1 +++ b/modules/Sentry/Sentry.psm1 @@ -5,10 +5,7 @@ $moduleInfo = Import-PowerShellDataFile (Join-Path (Split-Path -Parent $MyInvoca . "$privateDir/Get-SentryAssembliesDirectory.ps1" $sentryDllPath = (Join-Path (Get-SentryAssembliesDirectory) 'Sentry.dll') -# On PowerShell 7.3, we need to ignore a warning about using .NET 6 Sentry.assembly (that targets System.Runtime 6.0.0) -# while we actually target System.Runtime 7.0.0. The problem is no .NET7 version of Sentry anymore. -$ignoreCsCompilerWarnings = ($PSVersionTable.PSVersion.Major -eq 7 -and $PSVersionTable.PSVersion.Minor -eq 3) -Add-Type -TypeDefinition (Get-Content "$privateDir/SentryEventProcessor.cs" -Raw) -ReferencedAssemblies $sentryDllPath -IgnoreWarnings:$ignoreCsCompilerWarnings -Debug:$false +Add-Type -TypeDefinition (Get-Content "$privateDir/SentryEventProcessor.cs" -Raw) -ReferencedAssemblies $sentryDllPath -Debug:$false . "$privateDir/SentryEventProcessor.ps1" Get-ChildItem $publicDir -Filter '*.ps1' | ForEach-Object { diff --git a/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 b/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 index 4c2ee65..277fd5a 100644 --- a/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 +++ b/modules/Sentry/private/Get-SentryAssembliesDirectory.ps1 @@ -1,9 +1,10 @@ function GetTFM { # Source https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.4#net-framework-vs-net-core - # PowerShell 7.4 - Built on .NET 8.0 + # Also https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.4#powershell-end-of-support-dates + # PowerShell 7.4 (LTS-current) - Built on .NET 8.0 # PowerShell 7.3 - Built on .NET 7.0 - # PowerShell 7.2 (LTS-current) - Built on .NET 6.0 (LTS-current) + # PowerShell 7.2 (LTS) - Built on .NET 6.0 (LTS-current) # PowerShell 7.1 - Built on .NET 5.0 # PowerShell 7.0 (LTS) - Built on .NET Core 3.1 (LTS) # PowerShell 6.2 - Built on .NET Core 2.1 diff --git a/tests/integration.tests.ps1 b/tests/integration.tests.ps1 index 50d0b2b..9896d97 100644 --- a/tests/integration.tests.ps1 +++ b/tests/integration.tests.ps1 @@ -42,8 +42,7 @@ BeforeAll { # # It looks like the variable `$integrationTestScriptContent` is expanded in place and then evaluted as an expression. # Let's just skip these versions. We test Windows PowerShell as the target anyway in a test case. -# And we can live without testing on PowerShell 7.2 & 7.3 because we have tests for 7.4. -Describe 'Out-Sentry captures expected stack traces for command argument' -Skip:(($PSVersionTable.PSVersion.Major -eq 7 -and $PSVersionTable.PSVersion.Minor -le 3) -or $PSVersionTable.PSEdition -eq 'Desktop') { +Describe 'Out-Sentry captures expected stack traces for command argument' -Skip:($PSVersionTable.PSEdition -eq 'Desktop') { BeforeEach { Push-Location "$PSScriptRoot/.." $expected = @(