mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-08 03:41:11 -04:00
Detect failures in multiline PowerShell commands
GitLab inserts a check for failure after each command in our `script`. This is documented here https://docs.gitlab.com/runner/shells/#powershell However, it doesn't detect failures if we run commands back to back. This adds the checks GitLab would have added for us if we were able to make it do that.
This commit is contained in:
parent
aed135a7c0
commit
19725473d7
@ -632,12 +632,16 @@ macOS14_Xcode15_arm64:
|
|||||||
- |
|
- |
|
||||||
if (Get-ChildItem -Recurse *.pdb) {
|
if (Get-ChildItem -Recurse *.pdb) {
|
||||||
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
||||||
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
}
|
}
|
||||||
Push-Location ..
|
Push-Location ..
|
||||||
..\CI\Store-Symbols.ps1 -SkipCompress
|
..\CI\Store-Symbols.ps1 -SkipCompress
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
@ -645,8 +649,15 @@ macOS14_Xcode15_arm64:
|
|||||||
- |
|
- |
|
||||||
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
||||||
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
|
}
|
||||||
|
- |
|
||||||
|
if ($executables) {
|
||||||
|
foreach ($exe in $executables.Split(',')) {
|
||||||
|
& .\$exe
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
- if ($executables) { foreach ($exe in $executables.Split(',')) { & .\$exe } }
|
|
||||||
after_script:
|
after_script:
|
||||||
- Get-Volume
|
- Get-Volume
|
||||||
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
@ -779,12 +790,16 @@ macOS14_Xcode15_arm64:
|
|||||||
- |
|
- |
|
||||||
if (Get-ChildItem -Recurse *.pdb) {
|
if (Get-ChildItem -Recurse *.pdb) {
|
||||||
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" '*.pdb' CI-ID.txt
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
||||||
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
}
|
}
|
||||||
Push-Location ..
|
Push-Location ..
|
||||||
..\CI\Store-Symbols.ps1 -SkipCompress
|
..\CI\Store-Symbols.ps1 -SkipCompress
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
7z a -tzip "..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_sym_store.zip"))" '.\SymStore\*' $config\CI-ID.txt
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
@ -792,8 +807,15 @@ macOS14_Xcode15_arm64:
|
|||||||
- |
|
- |
|
||||||
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
if (Test-Path env:AWS_ACCESS_KEY_ID) {
|
||||||
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
aws --endpoint-url https://rgw.ctrl-c.liu.se s3 cp "..\..\$(Make-SafeFileName("OpenMW_MSVC2022_64_${config}_${CI_COMMIT_REF_NAME}.zip"))" s3://openmw-artifacts/${artifactDirectory}
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
|
}
|
||||||
|
- |
|
||||||
|
if ($executables) {
|
||||||
|
foreach ($exe in $executables.Split(',')) {
|
||||||
|
& .\$exe
|
||||||
|
if(!$?) { Exit $LASTEXITCODE }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
- if ($executables) { foreach ($exe in $executables.Split(',')) { & .\$exe } }
|
|
||||||
after_script:
|
after_script:
|
||||||
- Get-Volume
|
- Get-Volume
|
||||||
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user