Skip to content

Commit 1ec8afd

Browse files
committed
fix to build file
1 parent fd6cee2 commit 1ec8afd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

PSCompression.build.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ $CSharpPath = [Path]::Combine($PSScriptRoot, 'src', $ModuleName)
2525
$ReleasePath = [Path]::Combine($BuildPath, $ModuleName, $Version)
2626
$IsUnix = $PSEdition -eq 'Core' -and -not $IsWindows
2727
$UseNativeArguments = $PSVersionTable.PSVersion -gt '7.0'
28-
($csharpProjectInfo = [xml]::new()).Load((Get-Item ([Path]::Combine($CSharpPath, '*.csproj'))).FullName)
29-
$TargetFrameworks = @(@($csharpProjectInfo.Project.PropertyGroup)[0].
30-
TargetFrameworks.Split(';', [StringSplitOptions]::RemoveEmptyEntries))
28+
$csharpProjectInfo = [xml]::new()
29+
$csharpProjectInfo.Load((Convert-Path ([Path]::Combine($CSharpPath, '*.csproj'))))
30+
$TargetFrameworks = @(@($csharpProjectInfo.Project.PropertyGroup)[0].TargetFrameworks.Split(';', [StringSplitOptions]::RemoveEmptyEntries))
3131
$PSFramework = $TargetFrameworks[0]
3232

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

226+
$sourceMappingFile = [Path]::Combine($resultsPath, 'CoverageSourceMapping.txt')
227+
226228
$arguments = @(
227229
$watchFolder
228230
'--target', $pwsh
@@ -233,7 +235,7 @@ task DoTest {
233235
'--merge-with', $unitCoveragePath
234236
}
235237
if ($env:GITHUB_ACTIONS -eq 'true') {
236-
Set-Content $sourceMappingFile "|$($Manifest.RepositoryPath)$([Path]::DirectorySeparatorChar)=/_/"
238+
Set-Content $sourceMappingFile "|$PSScriptRoot$([Path]::DirectorySeparatorChar)=/_/"
237239
'--source-mapping-file', $sourceMappingFile
238240
}
239241
)

0 commit comments

Comments
 (0)