Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion dependencies/Sentry.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = 4.13.0
version = 5.0.1
repo = https://github.com/getsentry/sentry-dotnet
license = MIT
1 change: 0 additions & 1 deletion dependencies/download.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ 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 'net462'

# You can see the list of dependencies that are actually used in sentry-dotnet/src/Sentry/bin/Debug/net462
Expand Down
5 changes: 1 addition & 4 deletions modules/Sentry/Sentry.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 3 additions & 6 deletions modules/Sentry/private/Get-SentryAssembliesDirectory.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -13,10 +14,6 @@ function GetTFM
{
return 'net8.0'
}
elseif ($PSVersionTable.PSVersion -ge '7.2')
{
return 'net6.0'
}
else
{
return 'net462'
Expand Down
3 changes: 1 addition & 2 deletions tests/integration.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @(
Expand Down
Loading