mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
Merge pull request #232 from microsoft/dilan/powershell-osx-specific-buildscripts
PowerShell: OS-specific buildscripts
This commit is contained in:
2
.github/workflows/powershell-pr-check.yml
vendored
2
.github/workflows/powershell-pr-check.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- name: Install PowerShell
|
||||
run: |
|
||||
$path = Split-Path (Get-Command codeql).Source
|
||||
./powershell/build.ps1 $path
|
||||
./powershell/build-win64.ps1 $path
|
||||
- name: Run QL tests
|
||||
run: |
|
||||
codeql test run --threads=0 powershell/ql/test
|
||||
|
||||
18
powershell/build-linux64.ps1
Normal file
18
powershell/build-linux64.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)][string]$cliFolder
|
||||
)
|
||||
|
||||
$toolsLinux64Folder = Join-Path (Join-Path (Join-Path $cliFolder "powershell") "tools") "linux64"
|
||||
dotnet publish (Join-Path "$PSScriptRoot/extractor" "powershell.sln" | Resolve-Path) -o $toolsLinux64Folder -r linux-x64
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Build failed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$powershellFolder = Join-Path -Path $cliFolder -ChildPath "powershell"
|
||||
Copy-Item -Path "$PSScriptRoot/codeql-extractor.yml" -Destination $powershellFolder -Force
|
||||
Copy-Item -Path "$PSScriptRoot/downgrades" -Destination $powershellFolder -Recurse -Force
|
||||
$qlLibFolder = Join-Path -Path "$PSScriptRoot/ql" -ChildPath "lib"
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme.stats") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force
|
||||
18
powershell/build-osx64.ps1
Normal file
18
powershell/build-osx64.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)][string]$cliFolder
|
||||
)
|
||||
|
||||
$toolsOsx64Folder = Join-Path (Join-Path (Join-Path $cliFolder "powershell") "tools") "osx64"
|
||||
dotnet publish (Join-Path "$PSScriptRoot/extractor" "powershell.sln" | Resolve-Path) -o $toolsOsx64Folder -r osx-x64
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Build failed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$powershellFolder = Join-Path -Path $cliFolder -ChildPath "powershell"
|
||||
Copy-Item -Path "$PSScriptRoot/codeql-extractor.yml" -Destination $powershellFolder -Force
|
||||
Copy-Item -Path "$PSScriptRoot/downgrades" -Destination $powershellFolder -Recurse -Force
|
||||
$qlLibFolder = Join-Path -Path "$PSScriptRoot/ql" -ChildPath "lib"
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme.stats") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force
|
||||
@@ -3,7 +3,7 @@ param (
|
||||
)
|
||||
|
||||
$toolsWin64Folder = Join-Path (Join-Path (Join-Path $cliFolder "powershell") "tools") "win64"
|
||||
dotnet publish (Join-Path "$PSScriptRoot/extractor" "powershell.sln" | Resolve-Path) -o $toolsWin64Folder
|
||||
dotnet publish (Join-Path "$PSScriptRoot/extractor" "powershell.sln" | Resolve-Path) -o $toolsWin64Folder -r win-x64
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Build failed"
|
||||
exit 1
|
||||
@@ -15,4 +15,4 @@ Copy-Item -Path "$PSScriptRoot/downgrades" -Destination $powershellFolder -Recur
|
||||
$qlLibFolder = Join-Path -Path "$PSScriptRoot/ql" -ChildPath "lib"
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path (Join-Path $qlLibFolder "semmlecode.powershell.dbscheme.stats") -Destination $powershellFolder -Force
|
||||
Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force
|
||||
Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force
|
||||
Reference in New Issue
Block a user