Skip to content

Commit

Permalink
fix to build file
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Jun 5, 2024
1 parent fd6cee2 commit 1ec8afd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions PSCompression.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ $CSharpPath = [Path]::Combine($PSScriptRoot, 'src', $ModuleName)
$ReleasePath = [Path]::Combine($BuildPath, $ModuleName, $Version)
$IsUnix = $PSEdition -eq 'Core' -and -not $IsWindows
$UseNativeArguments = $PSVersionTable.PSVersion -gt '7.0'
($csharpProjectInfo = [xml]::new()).Load((Get-Item ([Path]::Combine($CSharpPath, '*.csproj'))).FullName)
$TargetFrameworks = @(@($csharpProjectInfo.Project.PropertyGroup)[0].
TargetFrameworks.Split(';', [StringSplitOptions]::RemoveEmptyEntries))
$csharpProjectInfo = [xml]::new()
$csharpProjectInfo.Load((Convert-Path ([Path]::Combine($CSharpPath, '*.csproj'))))
$TargetFrameworks = @(@($csharpProjectInfo.Project.PropertyGroup)[0].TargetFrameworks.Split(';', [StringSplitOptions]::RemoveEmptyEntries))
$PSFramework = $TargetFrameworks[0]

task Clean {
Expand Down Expand Up @@ -223,6 +223,8 @@ task DoTest {
$watchFolder = '"{0}"' -f ([Path]::Combine($ReleasePath, 'bin', $PSFramework))
}

$sourceMappingFile = [Path]::Combine($resultsPath, 'CoverageSourceMapping.txt')

$arguments = @(
$watchFolder
'--target', $pwsh
Expand All @@ -233,7 +235,7 @@ task DoTest {
'--merge-with', $unitCoveragePath
}
if ($env:GITHUB_ACTIONS -eq 'true') {
Set-Content $sourceMappingFile "|$($Manifest.RepositoryPath)$([Path]::DirectorySeparatorChar)=/_/"
Set-Content $sourceMappingFile "|$PSScriptRoot$([Path]::DirectorySeparatorChar)=/_/"
'--source-mapping-file', $sourceMappingFile
}
)
Expand Down

0 comments on commit 1ec8afd

Please sign in to comment.