mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 13:09:42 +00:00
Improve Store-Symbols.ps1
* Handle other things also using CMake's file API. * Ensure the right version of symstore is used. * Upgrade to symstore 0.3.4 to fix incorrect IDs.
This commit is contained in:
parent
42b77342c5
commit
949dc58741
1 changed files with 9 additions and 4 deletions
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue