diff --git a/Brain.md b/Brain.md index 59ea89f..11fd60e 100644 --- a/Brain.md +++ b/Brain.md @@ -36,6 +36,7 @@ src/mods-unpacked/Brogether-Brogether/ scripts/ package.ps1 + package-release.bat install-local.ps1 docs/ @@ -52,6 +53,7 @@ releases/ - `scripts/package.ps1` baut `dist\Brogether-Brogether-0.1.0.zip`. - Danach kopiert `scripts/package.ps1` denselben ZIP nach `releases\Brogether-Brogether-0.1.0.zip`. - `dist/` bleibt ignoriert; `releases/` wird committed, damit Tester den neuesten ZIP direkt aus dem Repo laden koennen. +- `scripts/package-release.bat` fragt interaktiv nach einem Versionsnamen und ruft `package.ps1 -Version ` auf. - Das Skript nutzt .NET `ZipArchive`, weil PowerShell `Compress-Archive` Backslash-Pfade erzeugt hatte, die Godot/Brotato nicht sauber akzeptierte. - ZIP-Struktur im Archiv: diff --git a/README.md b/README.md index f3cabc4..e7dff14 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ src/mods-unpacked/Brogether-Brogether/ scripts/ package.ps1 Builds the mod ZIP + package-release.bat Asks for a version name and builds the ZIP install-local.ps1 Installs the ZIP for local Brotato tests releases/ @@ -56,6 +57,14 @@ Brotato's Steam build only loads Workshop folders that Steam considers subscribe .\scripts\install-local.ps1 ``` +For a named release ZIP, run: + +```text +scripts\package-release.bat +``` + +The batch file asks for a version name and creates matching ZIPs in `dist/` and `releases/`. + Then fully restart Brotato. Brogether stays hidden until opened. The main menu gets a new `BROGETHER` button; `F5` opens the same modal. The modal pauses the game like Brotato's own F8 feedback window and can be closed with `Escape`, `F5`, or the close button. diff --git a/scripts/package-release.bat b/scripts/package-release.bat new file mode 100644 index 0000000..c334614 --- /dev/null +++ b/scripts/package-release.bat @@ -0,0 +1,43 @@ +@echo off +setlocal + +set "SCRIPT_DIR=%~dp0" +set "PROJECT_ROOT=%SCRIPT_DIR%.." + +echo. +echo Brogether package builder +echo ------------------------- +echo Example versions: 0.1.1, v0.1.1, workshop-update-1 +echo. + +set "VERSION=" +set /p VERSION=Enter version name for this build: + +if "%VERSION%"=="" ( + echo. + echo No version entered. Aborting. + pause + exit /b 1 +) + +echo. +echo Building Brogether-Brogether-%VERSION%.zip ... +echo. + +powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%package.ps1" -Version "%VERSION%" +if errorlevel 1 ( + echo. + echo Build failed. + pause + exit /b 1 +) + +echo. +echo Build finished. +echo Local ZIP: +echo %PROJECT_ROOT%\dist\Brogether-Brogether-%VERSION%.zip +echo. +echo Git release ZIP: +echo %PROJECT_ROOT%\releases\Brogether-Brogether-%VERSION%.zip +echo. +pause