Skip to content

Commit 4f8a94b

Browse files
committed
PS: Add simple build script.
1 parent 58fc649 commit 4f8a94b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

powershell/build.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
param (
2+
[Parameter(Mandatory=$true)][string]$cliFolder
3+
)
4+
5+
$toolsWin64Folder = Join-Path (Join-Path (Join-Path $cliFolder "powershell") "tools") "win64"
6+
dotnet publish (Join-Path "extractor" "powershell.sln") -o $toolsWin64Folder
7+
if ($LASTEXITCODE -ne 0) {
8+
Write-Host "Build failed"
9+
exit 1
10+
}
11+
12+
$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"
15+
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme") -Destination $powershellFolder -Force
16+
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme.stats") -Destination $powershellFolder -Force
17+
Copy-Item -Path "tools" -Destination $powershellFolder -Recurse -Force

0 commit comments

Comments
 (0)