1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-07-02 13:41:38 +00:00

Merge branch 'store-symbol-improvements' into 'master'

Improve Store-Symbols.ps1

See merge request OpenMW/openmw!3426
This commit is contained in:
psi29a 2023-09-16 15:05:26 +00:00
commit 18a77554f0

View file

@ -3,10 +3,12 @@ if (-Not (Test-Path CMakeCache.txt))
Write-Error "This script must be run from the build directory."
}
if (-Not (Test-Path .cmake\api\v1\reply))
if (-Not (Test-Path .cmake\api\v1\reply\index-*.json) -Or -Not ((Get-Content -Raw .cmake\api\v1\reply\index-*.json | ConvertFrom-Json).reply.PSObject.Properties.Name -contains "codemodel-v2"))
{
Write-Output "Running CMake query..."
New-Item -Type File -Force .cmake\api\v1\query\codemodel-v2
cmake .
Write-Output "Done."
}
try
@ -44,9 +46,12 @@ if (-not (Test-Path symstore-venv))
{
python -m venv symstore-venv
}
if (-not (Test-Path symstore-venv\Scripts\symstore.exe))
$symstoreVersion = "0.3.4"
if (-not (Test-Path symstore-venv\Scripts\symstore.exe) -or -not ((symstore-venv\Scripts\pip show symstore | Select-String '(?<=Version: ).*').Matches.Value -eq $symstoreVersion))
{
symstore-venv\Scripts\pip install symstore==0.3.3
symstore-venv\Scripts\pip install symstore==$symstoreVersion
}
$artifacts = $artifacts | Where-Object { Test-Path $_ }
symstore-venv\Scripts\symstore --compress .\SymStore @artifacts
Write-Output "Storing symbols..."
symstore-venv\Scripts\symstore --compress --skip-published .\SymStore @artifacts
Write-Output "Done."