Last active
January 17, 2024 17:48
-
-
Save AnyOldName3/5e35690efa07c6e3daa783405358eed3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$buildDirs = "VulkanSceneGraph\build", "vsgXchange", "vsgImGui", "vsgExamples", "vsgTutorial" | |
$installDir = "${PSScriptRoot}\install" | |
$buildDirs | ForEach-Object { | |
Push-Location $_ | |
try { | |
$branch = git branch --show-current | |
if ($branch -ne "master") { | |
Write-Warning "$_ is on branch $branch" | |
} | |
git pull --ff-only | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
git submodule update --init --recursive | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --build . --config Release | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --build . --config Debug | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --build . --config RelWithDebInfo | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --install . --config Release --prefix $installDir | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --install . --config Debug --prefix $installDir | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
cmake --install . --config RelWithDebInfo --prefix $installDir | |
if ($LASTEXITCODE -ne 0) { | |
throw "Exited with code $LASTEXITCODE" | |
} | |
} | |
finally { | |
Pop-Location | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment