fix build bat

This commit is contained in:
辉鸭蛋 2024-09-17 12:24:58 +08:00
parent 8dbdf0840c
commit bfe6b69edd
3 changed files with 11 additions and 21 deletions

View File

@ -10,7 +10,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationIcon>Assets\logo.ico</ApplicationIcon>
<AssemblyName>BetterGI</AssemblyName>
<AssemblyVersion>0.34.1</AssemblyVersion>
<AssemblyVersion>0.34.2</AssemblyVersion>
<Platforms>x64</Platforms>
</PropertyGroup>

View File

@ -6,16 +6,11 @@ mkdir dist\BetterGI
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "path=%path%;%%i\MSBuild\Current\Bin;%%i\Common7\IDE"
@echo [prepare version]
cd /d ..\BetterGenshinImpact\Core\Config
set "script=Get-Content 'Global.cs' ^| Select-String -Pattern 'Version.*\"(.*)\"' ^| ForEach-Object { $_.Matches.Groups[1].Value }"
for /f "usebackq delims=" %%i in (`powershell -NoLogo -NoProfile -Command ^"%script%^"`) do set version=%%i
echo currnet version is %version%
if "%b%"=="" (
set "b=%version%"
)
cd /d ..\BetterGenshinImpact
set "script=Get-Content 'BetterGenshinImpact.csproj' | Select-String -Pattern 'AssemblyVersion\>(.*)\<\/AssemblyVersion' | ForEach-Object { $_.Matches.Groups[1].Value }"
for /f "usebackq delims=" %%i in (`powershell -NoLogo -NoProfile -Command "%script%"`) do set version=%%i
echo current version is %version%
if "%b%"=="" ( set "b=%version%" )
set "tmpfolder=%~dp0dist\BetterGI"
set "archiveFile=BetterGI_v%b%.7z"

View File

@ -6,16 +6,11 @@ mkdir dist\BetterGI
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "path=%path%;%%i\MSBuild\Current\Bin;%%i\Common7\IDE"
@echo [prepare version]
cd /d ..\BetterGenshinImpact\Core\Config
set "script=Get-Content 'Global.cs' ^| Select-String -Pattern 'Version.*\"(.*)\"' ^| ForEach-Object { $_.Matches.Groups[1].Value }"
for /f "usebackq delims=" %%i in (`powershell -NoLogo -NoProfile -Command ^"%script%^"`) do set version=%%i
echo currnet version is %version%
if "%b%"=="" (
set "b=%version%"
)
cd /d ..\BetterGenshinImpact
set "script=Get-Content 'BetterGenshinImpact.csproj' | Select-String -Pattern 'AssemblyVersion\>(.*)\<\/AssemblyVersion' | ForEach-Object { $_.Matches.Groups[1].Value }"
for /f "usebackq delims=" %%i in (`powershell -NoLogo -NoProfile -Command "%script%"`) do set version=%%i
echo current version is %version%
if "%b%"=="" ( set "b=%version%" )
set "tmpfolder=%~dp0dist\BetterGI"
set "archiveFile=BetterGI_v%b%.7z"