CSGO-Projects/DamageCalculator/publish.bat
Mathias Lui 81b2b98394 Increase to .NET 7.0 & Add ugly publishing scripts
* Scripts got added for DamageCalculator and ConfigManager
* Batch scripts will need 7z be added to PATH, as well as the two specified profiles in order to work
* Alter publish profiles to fit to the scripts, one for self-contained and one for lower file size
* Add explicit cast that is now needed to remove ambiguity
2023-03-01 23:43:32 +01:00

44 lines
No EOL
1.2 KiB
Batchfile

@echo off
:Start
set /p "version=TYPE IN VERSION NUMBER: "
IF "%version%" == "" GOTO Start
mkdir publish
echo Deleting old releases...
del /q publish\*
echo Publishing framework dependent version...
dotnet publish .\DamageCalculator\DamageCalculator.csproj /p:PublishProfile=DamageCalculator\Properties\PublishProfiles\FrameworkDependentProfile.pubxml
echo Removing PDBs...
del DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator\*.pdb
echo Zipping folder...
7z a DamageCalculator.zip .\DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator
echo Moving and renaming file...
move /y "DamageCalculator.zip" "publish\csgo_damage_calculator_FD_x64_%version%.zip"
echo Publishing standalone (self-contained) version...
dotnet publish .\DamageCalculator\DamageCalculator.csproj /p:PublishProfile=DamageCalculator\Properties\PublishProfiles\SelfContainedProfile.pubxml
echo Removing PDBs...
del DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator\*.pdb
echo Zipping folder...
7z a DamageCalculator.zip .\DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator
echo Moving and renaming file...
move /y "DamageCalculator.zip" "publish\csgo_damage_calculator_SC_x64_%version%.zip"
pause