From fd217f12b4a6a37e4e3d2fdd412e8392ec9cfb42 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 4 Sep 2025 04:24:54 +1200 Subject: [PATCH] Update dotnet build lines --- .github/workflows/github_actions.yml | 8 +++----- build-scripts/dotnet/build-dotnet.cmd | 2 +- src-electron/patch-package-version.js | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index a4a3e4bf..ed0d6ae8 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -37,9 +37,7 @@ jobs: echo "${{ needs.set_version.outputs.version }}" > Version cat Version - name: Build Cef .NET Application - run: dotnet build Dotnet\VRCX-Cef.csproj -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained - - name: Build Cef .NET Application - run: dotnet build DBMerger\DBMerger.csproj -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained + run: dotnet build Dotnet\VRCX-Cef.csproj -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:PlatformTarget=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m -a x64 --self-contained - name: Upload Cef dotnet artifacts uses: actions/upload-artifact@v4 with: @@ -60,7 +58,7 @@ jobs: echo "${{ needs.set_version.outputs.version }}" > Version cat Version - name: Build Electron x64 .NET Application - run: dotnet build 'Dotnet/VRCX-Electron.csproj' -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained + run: dotnet build 'Dotnet/VRCX-Electron.csproj' -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:PlatformTarget=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m -a x64 --self-contained - name: Upload Electron x64 dotnet artifacts uses: actions/upload-artifact@v4 with: @@ -88,7 +86,7 @@ jobs: echo "${{ needs.set_version.outputs.version }}" > Version cat Version - name: Build Electron x64 .NET Application - run: dotnet build 'Dotnet/VRCX-Electron.csproj' -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m -a x64 --self-contained + run: dotnet build 'Dotnet/VRCX-Electron.csproj' -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:PlatformTarget=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m -a x64 --self-contained - name: Upload Electron x64 .NET artifacts uses: actions/upload-artifact@v4 with: diff --git a/build-scripts/dotnet/build-dotnet.cmd b/build-scripts/dotnet/build-dotnet.cmd index 759422b2..58f44568 100644 --- a/build-scripts/dotnet/build-dotnet.cmd +++ b/build-scripts/dotnet/build-dotnet.cmd @@ -1,4 +1,4 @@ @echo off cd ../../ -dotnet build Dotnet\VRCX-Cef.csproj -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained +dotnet build Dotnet\VRCX-Cef.csproj -p:Configuration=Release -p:WarningLevel=0 -p:Platform=x64 -p:PlatformTarget=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m -a x64 --self-contained pause diff --git a/src-electron/patch-package-version.js b/src-electron/patch-package-version.js index 55263b73..7bdb1491 100644 --- a/src-electron/patch-package-version.js +++ b/src-electron/patch-package-version.js @@ -13,6 +13,9 @@ try { // Remove time part from version version = version.substring(0, index).replaceAll('-', '.'); } + if (!version || version === 'Nightly Build') { + version = new Date().toISOString().split('T')[0].replaceAll('-', '.'); + } } catch (err) { console.error('Error reading Version file:', err); process.exit(1);