Allow package batch to run from anywhere

This commit is contained in:
Kroonk
2026-05-23 10:43:17 +02:00
parent 88124ce71b
commit 5dee1a8e7d
3 changed files with 16 additions and 5 deletions

View File

@@ -1,15 +1,26 @@
@echo off
setlocal
set "SCRIPT_DIR=%~dp0"
set "PROJECT_ROOT=%SCRIPT_DIR%.."
set "PROJECT_ROOT=C:\Users\tommi\Documents\PotatoConnect"
set "PACKAGE_SCRIPT=%PROJECT_ROOT%\scripts\package.ps1"
echo.
echo Brogether package builder
echo -------------------------
echo Project: %PROJECT_ROOT%
echo Example versions: 0.1.1, v0.1.1, workshop-update-1
echo.
if not exist "%PACKAGE_SCRIPT%" (
echo.
echo Could not find package script:
echo %PACKAGE_SCRIPT%
echo.
echo Open scripts\package-release.bat in a text editor and update PROJECT_ROOT.
pause
exit /b 1
)
set "VERSION="
set /p VERSION=Enter version name for this build:
@@ -24,7 +35,7 @@ echo.
echo Building Brogether-Brogether-%VERSION%.zip ...
echo.
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%package.ps1" -Version "%VERSION%"
powershell -NoProfile -ExecutionPolicy Bypass -File "%PACKAGE_SCRIPT%" -Version "%VERSION%"
if errorlevel 1 (
echo.
echo Build failed.