diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index 23667a9..7ca8042 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -73,7 +73,7 @@ jobs: working-directory: tools # script expects this directory run: | lua -v - pwsh ./index.ps1 -target ..\app -inputUnits "../temp/units" -inputLua "../temp/Lua" + pwsh ./index.ps1 -target ../app -inputUnits "../temp/units" -inputLua "../temp/Lua" - name: Add the generated file as an artifact uses: actions/upload-artifact@v4 diff --git a/tools/index.ps1 b/tools/index.ps1 index c8e387f..79ac682 100644 --- a/tools/index.ps1 +++ b/tools/index.ps1 @@ -55,9 +55,10 @@ Function Run { $json = Create-UnitIndex "$inputUnits" "$inputLua/version.lua" $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False) # [System.IO.File]::WriteAllLines("$target\data\index.json" , $json, $Utf8NoBomEncoding) - Set-Content -Path "$target\data\index.json" -Value $json - echo "$target\data\index.json" + $json | Out-File -FilePath "$target\data\index.json" + echo "$target\data\index.json" + Write-Progress -Activity "Cleaning" python cleaner.py $target