4141 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4242 run : |
4343 $repoDir = (Get-Location).Path
44- $currentVersion = (Get-Item -Path "$repoDir\Resources\clientdx.exe").VersionInfo.FileVersion -Replace "\.0$", ""
44+ $clientDir = $repoDir + "\${{ env.CLIENT_PATH }}"
45+ $currentVersion = (Get-Item -Path "$clientDir\Resources\clientdx.exe").VersionInfo.FileVersion -Replace "\.0$", ""
4546 $downloadVersion = '${{ steps.download.outputs.tag_name }}'
4647
4748 echo "Current client version: '$currentVersion'"
@@ -64,16 +65,18 @@ jobs:
6465 git checkout -b ${{ env.UPDATE_BRANCH_NAME }}-${{ steps.download.outputs.tag_name }}
6566
6667 # Delete old binaries, unpack archive, remove archive
67- rm -r -fo "$repoDir\Resources\Binaries"
68- rm -r -fo "$repoDir\Resources\BinariesNET8"
69- 7z x xna-cncnet-client-*.7z -y
68+ rm -r -fo "$clientDir\Resources\Binaries"
69+ rm -r -fo "$clientDir\Resources\BinariesNET8"
70+ 7z x xna-cncnet-client-*.7z -y -oTEMPORARY
71+ cp -r -fo "TEMPORARY\Resources\*" "$clientDir\Resources\"
72+ rm -r -fo TEMPORARY
7073 rm xna-cncnet-client-*.7z
7174
7275 # Commit changes
7376 git commit -am "${{ env.COMMIT_MESSAGE }}"
7477
7578 # Path to the updateexec file
76- $updateExecPath = "$repoDir\${{ env.CLIENT_PATH }} \updateexec"
79+ $updateExecPath = "$clientDir \updateexec"
7780
7881 # Check if the updateexec file exists
7982 if (-Not (Test-Path -Path $updateExecPath))
0 commit comments