One-click LAUNCH.bat: pull, UI build, tunnel, and server start.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Operators double-click LAUNCH for git pull, npm build, data prep, cloudflared, and AetherForge or dev miner-server; devrun shares launch-prep.
This commit is contained in:
66
devrun.bat
66
devrun.bat
@@ -73,7 +73,7 @@ echo Go installed.
|
||||
|
||||
:go_ready
|
||||
|
||||
:: Garble + go-winres (Forge pipeline tools — failure is non-fatal)
|
||||
:: Garble + go-winres (Forge pipeline tools ??? failure is non-fatal)
|
||||
echo [1.5/5] Checking Forge tools (Garble, go-winres)...
|
||||
where garble >nul 2>nul
|
||||
if errorlevel 1 (
|
||||
@@ -131,6 +131,26 @@ echo Node.js installed.
|
||||
|
||||
:node_ready
|
||||
|
||||
:: ============================================================
|
||||
:: STEP 2b: Git pull + UI build (shared with LAUNCH.bat)
|
||||
:: ============================================================
|
||||
if defined SKIP_FRONTEND (
|
||||
echo.
|
||||
echo Pulling latest ^(UI build skipped - Node.js unavailable^)...
|
||||
git -C "%ROOT%" pull origin main 2>nul
|
||||
if errorlevel 1 echo Note: git pull skipped or failed.
|
||||
) else (
|
||||
echo.
|
||||
echo Pulling latest + building UI...
|
||||
set "PREP=%ROOT%\scripts\launch-prep.bat"
|
||||
if exist "%PREP%" (
|
||||
call "%PREP%" "%ROOT%"
|
||||
if errorlevel 1 goto fatal_exit
|
||||
) else (
|
||||
echo WARNING: scripts\launch-prep.bat missing - skipping pull/UI prep.
|
||||
)
|
||||
)
|
||||
|
||||
:: ============================================================
|
||||
:: STEP 3: Data directories
|
||||
:: ============================================================
|
||||
@@ -142,44 +162,6 @@ if not exist "data\preps" mkdir "data\preps"
|
||||
if not exist "bin" mkdir "bin"
|
||||
echo OK: data\ and bin\
|
||||
|
||||
:: ============================================================
|
||||
:: STEP 4: Frontend
|
||||
:: ============================================================
|
||||
if defined SKIP_FRONTEND goto skip_frontend
|
||||
echo [4/5] Building dashboard (server\web)...
|
||||
cd /d "%ROOT%\server\web"
|
||||
if not exist "node_modules" (
|
||||
echo npm install...
|
||||
call npm install
|
||||
if errorlevel 1 (
|
||||
cd /d "%ROOT%"
|
||||
echo ERROR: npm install failed.
|
||||
goto fatal_exit
|
||||
)
|
||||
)
|
||||
echo npm run build...
|
||||
call npm run build
|
||||
if errorlevel 1 (
|
||||
cd /d "%ROOT%"
|
||||
echo ERROR: Frontend build failed.
|
||||
goto fatal_exit
|
||||
)
|
||||
cd /d "%ROOT%"
|
||||
echo Frontend built: server\web\dist
|
||||
goto frontend_done
|
||||
|
||||
:skip_frontend
|
||||
echo [4/5] Skipping frontend build (Node.js unavailable)
|
||||
if not exist "server\web\dist\index.html" (
|
||||
echo WARNING: No server\web\dist\index.html — dashboard may not load.
|
||||
)
|
||||
|
||||
:frontend_done
|
||||
if exist "server\web\dist\index.html" (
|
||||
if not exist "server\webroot" mkdir "server\webroot"
|
||||
xcopy /E /I /Y /Q "server\web\dist\*" "server\webroot\" >nul
|
||||
echo Copied dashboard to server\webroot
|
||||
)
|
||||
|
||||
:: ============================================================
|
||||
:: STEP 5: Server binary
|
||||
@@ -198,7 +180,7 @@ if errorlevel 1 (
|
||||
cd /d "%ROOT%"
|
||||
|
||||
if defined AETHERFORGE_RELEASE (
|
||||
echo Release mode active — set AETHERFORGE_RELEASE=1 for server process.
|
||||
echo Release mode active ??? set AETHERFORGE_RELEASE=1 for server process.
|
||||
)
|
||||
|
||||
if not exist "bin\miner-server.exe" (
|
||||
@@ -208,7 +190,7 @@ if not exist "bin\miner-server.exe" (
|
||||
echo Server binary: bin\miner-server.exe
|
||||
|
||||
:: ============================================================
|
||||
:: LAUNCH (foreground — logs stay in this window)
|
||||
:: LAUNCH (foreground ??? logs stay in this window)
|
||||
:: ============================================================
|
||||
echo.
|
||||
echo Stopping any previous miner-server.exe...
|
||||
@@ -261,7 +243,7 @@ goto end_pause
|
||||
:fatal_exit
|
||||
echo.
|
||||
echo ==============================================================
|
||||
echo LAUNCH FAILED — fix the errors above and run devrun.bat again.
|
||||
echo LAUNCH FAILED ??? fix the errors above and run devrun.bat again.
|
||||
echo ==============================================================
|
||||
echo.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user