Skip to content

Commit 3dc74e9

Browse files
committed
PS: Harden the build script so that you can run it from any folder.
1 parent 337cb8b commit 3dc74e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

powershell/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ param (
33
)
44

55
$toolsWin64Folder = Join-Path (Join-Path (Join-Path $cliFolder "powershell") "tools") "win64"
6-
dotnet publish (Join-Path "extractor" "powershell.sln" | Resolve-Path) -o $toolsWin64Folder
6+
dotnet publish (Join-Path "$PSScriptRoot/extractor" "powershell.sln" | Resolve-Path) -o $toolsWin64Folder
77
if ($LASTEXITCODE -ne 0) {
88
Write-Host "Build failed"
99
exit 1
1010
}
1111

1212
$powershellFolder = Join-Path -Path $cliFolder -ChildPath "powershell"
13-
Copy-Item -Path codeql-extractor.yml -Destination $powershellFolder -Force
14-
$qlLibFolder = Join-Path -Path "ql" -ChildPath "lib"
13+
Copy-Item -Path "$PSScriptRoot/codeql-extractor.yml" -Destination $powershellFolder -Force
14+
$qlLibFolder = Join-Path -Path "$PSScriptRoot/ql" -ChildPath "lib"
1515
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme") -Destination $powershellFolder -Force
1616
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme.stats") -Destination $powershellFolder -Force
17-
Copy-Item -Path "tools" -Destination $powershellFolder -Recurse -Force
17+
Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force

0 commit comments

Comments
 (0)