Skip to content

Commit 9455238

Browse files
github-actions[bot]web-flowvaind
authored
update Dotnet SDK to v5.0.1 and drop pwsh 7.2 and 7.3 support (#71)
* chore: update dependencies/Sentry.properties to 5.0.1 * chore: update download.ps1 * remove net6 sentry-dotnet * drop support for pwsh 7.2 and 7.3 --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Ivan Dlugos <[email protected]>
1 parent 0c35e5d commit 9455238

File tree

8 files changed

+10
-20
lines changed

8 files changed

+10
-20
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
shell: [pwsh]
4242
version:
4343
- '7.4.0'
44-
- '7.3.0'
45-
- '7.2.0'
4644
# And test all built-in PowerShell/Windows Powershell versions on latest CI runner images
4745
include:
4846
- os: ubuntu

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
### Dependencies
1111

12-
- Bump Dotnet SDK from v4.12.1 to v4.13.0 ([#69](https://github.com/getsentry/sentry-powershell/pull/69))
13-
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#4130)
14-
- [diff](https://github.com/getsentry/sentry-dotnet/compare/4.12.1...4.13.0)
12+
- 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))
13+
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#501)
14+
- [diff](https://github.com/getsentry/sentry-dotnet/compare/4.12.1...5.0.1)
1515

1616
## 0.2.0
1717

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Although the underlying .NET SDK is proven in production, the PowerShell Sentry
2525
The PowerShell Sentry SDK is tested to work with:
2626

2727
- Windows PowerShell 5.1
28-
- PowerShell 7.2+ on Windows, macOS, and Linux
28+
- PowerShell 7.4+ on Windows, macOS, and Linux
2929

3030
## Documentation
3131

dependencies/Sentry.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = 4.13.0
1+
version = 5.0.1
22
repo = https://github.com/getsentry/sentry-dotnet
33
license = MIT

dependencies/download.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ function Download([string] $dependency, [string] $TFM, [string] $targetTFM = $nu
110110
}
111111

112112
Download -Dependency 'Sentry' -TFM 'net8.0'
113-
Download -Dependency 'Sentry' -TFM 'net6.0'
114113
Download -Dependency 'Sentry' -TFM 'net462'
115114

116115
# You can see the list of dependencies that are actually used in sentry-dotnet/src/Sentry/bin/Debug/net462

modules/Sentry/Sentry.psm1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ $moduleInfo = Import-PowerShellDataFile (Join-Path (Split-Path -Parent $MyInvoca
55
. "$privateDir/Get-SentryAssembliesDirectory.ps1"
66
$sentryDllPath = (Join-Path (Get-SentryAssembliesDirectory) 'Sentry.dll')
77

8-
# On PowerShell 7.3, we need to ignore a warning about using .NET 6 Sentry.assembly (that targets System.Runtime 6.0.0)
9-
# while we actually target System.Runtime 7.0.0. The problem is no .NET7 version of Sentry anymore.
10-
$ignoreCsCompilerWarnings = ($PSVersionTable.PSVersion.Major -eq 7 -and $PSVersionTable.PSVersion.Minor -eq 3)
11-
Add-Type -TypeDefinition (Get-Content "$privateDir/SentryEventProcessor.cs" -Raw) -ReferencedAssemblies $sentryDllPath -IgnoreWarnings:$ignoreCsCompilerWarnings -Debug:$false
8+
Add-Type -TypeDefinition (Get-Content "$privateDir/SentryEventProcessor.cs" -Raw) -ReferencedAssemblies $sentryDllPath -Debug:$false
129
. "$privateDir/SentryEventProcessor.ps1"
1310

1411
Get-ChildItem $publicDir -Filter '*.ps1' | ForEach-Object {

modules/Sentry/private/Get-SentryAssembliesDirectory.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
function GetTFM
22
{
33
# Source https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.4#net-framework-vs-net-core
4-
# PowerShell 7.4 - Built on .NET 8.0
4+
# Also https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.4#powershell-end-of-support-dates
5+
# PowerShell 7.4 (LTS-current) - Built on .NET 8.0
56
# PowerShell 7.3 - Built on .NET 7.0
6-
# PowerShell 7.2 (LTS-current) - Built on .NET 6.0 (LTS-current)
7+
# PowerShell 7.2 (LTS) - Built on .NET 6.0 (LTS-current)
78
# PowerShell 7.1 - Built on .NET 5.0
89
# PowerShell 7.0 (LTS) - Built on .NET Core 3.1 (LTS)
910
# PowerShell 6.2 - Built on .NET Core 2.1
@@ -13,10 +14,6 @@ function GetTFM
1314
{
1415
return 'net8.0'
1516
}
16-
elseif ($PSVersionTable.PSVersion -ge '7.2')
17-
{
18-
return 'net6.0'
19-
}
2017
else
2118
{
2219
return 'net462'

tests/integration.tests.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ BeforeAll {
4242
#
4343
# It looks like the variable `$integrationTestScriptContent` is expanded in place and then evaluted as an expression.
4444
# Let's just skip these versions. We test Windows PowerShell as the target anyway in a test case.
45-
# And we can live without testing on PowerShell 7.2 & 7.3 because we have tests for 7.4.
46-
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') {
45+
Describe 'Out-Sentry captures expected stack traces for command argument' -Skip:($PSVersionTable.PSEdition -eq 'Desktop') {
4746
BeforeEach {
4847
Push-Location "$PSScriptRoot/.."
4948
$expected = @(

0 commit comments

Comments
 (0)