Fix powershel

This commit is contained in:
skykooler 2024-12-19 00:00:22 -05:00 committed by GitHub
parent 89de623d87
commit 175f6e6fda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 5 deletions

View File

@ -34,7 +34,7 @@ jobs:
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Set version for Windows build
if: matrix.platform == 'windows-latest'
if: matrix.platform == 'windows-latest' # Only run on Windows
shell: pwsh # Use PowerShell on Windows runners
run: |
# Get the version from the Git tag (e.g., v0.6.3-alpha)
@ -51,11 +51,16 @@ jobs:
# Copy tauri.conf.json to tauri.windows.conf.json and substitute version number for Windows
Copy-Item src-tauri/tauri.conf.json -Destination src-tauri/tauri.windows.conf.json
(Get-Content src-tauri/tauri.windows.conf.json) | ForEach-Object { $_ -replace '"version": ".*"', '"version": "' + $WINDOWS_VERSION + '"' } | Set-Content src-tauri/tauri.windows.conf.json
# Modify the version in tauri.windows.conf.json
(Get-Content src-tauri/tauri.windows.conf.json) | ForEach-Object {
$_ -replace '"version": ".*"', ('"version": "' + $WINDOWS_VERSION + '"')
} | Set-Content src-tauri/tauri.windows.conf.json
# Export the Windows version for use in subsequent steps
echo "WINDOWS_VERSION=$WINDOWS_VERSION" >> $env:GITHUB_ENV
- name: Set version for all platforms
run: |
# Extract the version from the Git tag (it should be the same across platforms)