Add interactive package batch script
This commit is contained in:
2
Brain.md
2
Brain.md
@@ -36,6 +36,7 @@ src/mods-unpacked/Brogether-Brogether/
|
|||||||
|
|
||||||
scripts/
|
scripts/
|
||||||
package.ps1
|
package.ps1
|
||||||
|
package-release.bat
|
||||||
install-local.ps1
|
install-local.ps1
|
||||||
|
|
||||||
docs/
|
docs/
|
||||||
@@ -52,6 +53,7 @@ releases/
|
|||||||
- `scripts/package.ps1` baut `dist\Brogether-Brogether-0.1.0.zip`.
|
- `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`.
|
- 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.
|
- `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 <name>` auf.
|
||||||
- Das Skript nutzt .NET `ZipArchive`, weil PowerShell `Compress-Archive` Backslash-Pfade erzeugt hatte, die Godot/Brotato nicht sauber akzeptierte.
|
- Das Skript nutzt .NET `ZipArchive`, weil PowerShell `Compress-Archive` Backslash-Pfade erzeugt hatte, die Godot/Brotato nicht sauber akzeptierte.
|
||||||
- ZIP-Struktur im Archiv:
|
- ZIP-Struktur im Archiv:
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ src/mods-unpacked/Brogether-Brogether/
|
|||||||
|
|
||||||
scripts/
|
scripts/
|
||||||
package.ps1 Builds the mod ZIP
|
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
|
install-local.ps1 Installs the ZIP for local Brotato tests
|
||||||
|
|
||||||
releases/
|
releases/
|
||||||
@@ -56,6 +57,14 @@ Brotato's Steam build only loads Workshop folders that Steam considers subscribe
|
|||||||
.\scripts\install-local.ps1
|
.\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.
|
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.
|
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.
|
||||||
|
|||||||
43
scripts/package-release.bat
Normal file
43
scripts/package-release.bat
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user