Skip to content

Commit

Permalink
Try a different approach to writing the file
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas committed Apr 30, 2024
1 parent 6dfe331 commit 4e10760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tools/index.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4e10760

Please sign in to comment.