From 5be20a0d1020f9d78fd200aaef8ecbbe548481d6 Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Thu, 15 May 2025 11:52:25 -0700 Subject: [PATCH 1/5] Rename build.ps1 to build-win64.ps1 --- powershell/{build.ps1 => build-win64.ps1} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename powershell/{build.ps1 => build-win64.ps1} (97%) diff --git a/powershell/build.ps1 b/powershell/build-win64.ps1 similarity index 97% rename from powershell/build.ps1 rename to powershell/build-win64.ps1 index 4c955958faa..bd123b938fd 100644 --- a/powershell/build.ps1 +++ b/powershell/build-win64.ps1 @@ -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 \ No newline at end of file +Copy-Item -Path "$PSScriptRoot/tools" -Destination $powershellFolder -Recurse -Force From c632477eb327cb83ff435f223402ef4cf7e80309 Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Thu, 15 May 2025 11:57:58 -0700 Subject: [PATCH 2/5] Create build-osx64.ps1 --- powershell/build-osx64.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 powershell/build-osx64.ps1 diff --git a/powershell/build-osx64.ps1 b/powershell/build-osx64.ps1 new file mode 100644 index 00000000000..55877ceef6e --- /dev/null +++ b/powershell/build-osx64.ps1 @@ -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 From 0fab231c336b5c6758674b64a1420cf444e5ea46 Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Thu, 15 May 2025 11:58:26 -0700 Subject: [PATCH 3/5] Update build-win64.ps1 --- powershell/build-win64.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powershell/build-win64.ps1 b/powershell/build-win64.ps1 index bd123b938fd..26268167f4b 100644 --- a/powershell/build-win64.ps1 +++ b/powershell/build-win64.ps1 @@ -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 From e250f9b6ce3a94f71151fb813193bb5a7008d662 Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Thu, 15 May 2025 11:59:37 -0700 Subject: [PATCH 4/5] Create build-linux64.ps1 --- powershell/build-linux64.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 powershell/build-linux64.ps1 diff --git a/powershell/build-linux64.ps1 b/powershell/build-linux64.ps1 new file mode 100644 index 00000000000..2bfa2c9880c --- /dev/null +++ b/powershell/build-linux64.ps1 @@ -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 From 0d38a98bad07273e9ecc68687095a15a4c9400b4 Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Thu, 15 May 2025 12:00:45 -0700 Subject: [PATCH 5/5] Update powershell-pr-check.yml --- .github/workflows/powershell-pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/powershell-pr-check.yml b/.github/workflows/powershell-pr-check.yml index 241fc012318..d6ab9098980 100644 --- a/.github/workflows/powershell-pr-check.yml +++ b/.github/workflows/powershell-pr-check.yml @@ -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