Files

52 lines
1.4 KiB
Batchfile
Raw Permalink Normal View History

@echo off
cd /d "%~dp0"
echo.
echo ============================================
echo ReminderOrganizer - Release Builder
echo ============================================
echo.
echo [1/4] Tests...
dotnet test Tests\ReminderOrganizer.Tests.csproj -nologo -v q
if errorlevel 1 (
echo.
echo *** Tests fehlgeschlagen - kein Release! ***
pause
exit /b 1
)
echo [2/4] Loesche alte Dateien...
if exist "publish" rmdir /s /q "publish"
if exist "ReminderOrganizer.zip" del "ReminderOrganizer.zip"
echo [3/4] Baue Single-File EXE...
rem Locales are embedded; data lives in %%APPDATA%%\ReminderOrganizer (not next to the exe).
dotnet publish ReminderOrganizer.csproj -c Release -r win-x64 --self-contained true ^
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true ^
-p:EnableCompressionInSingleFile=true -p:DebugType=none -o publish
if errorlevel 1 (
echo.
echo *** FEHLER beim Bauen! ***
pause
exit /b 1
)
echo [4/4] Erstelle ZIP Datei...
powershell -NoProfile -Command "Compress-Archive -Path 'publish\ReminderOrganizer.exe' -DestinationPath 'ReminderOrganizer.zip' -Force"
if errorlevel 1 (
echo.
echo *** FEHLER beim ZIP erstellen! ***
pause
exit /b 1
)
echo.
echo ============================================
echo FERTIG! ReminderOrganizer.zip
echo Inhalt: ReminderOrganizer.exe (Deutsch/Englisch eingebaut)
echo ============================================
echo.
if "%1"=="" pause