caterium-app/PUSH-TO-GITHUB.bat
2026-09-07 15:29:20 +03:00

63 lines
1.6 KiB
Batchfile

@echo off
setlocal
cd /d "%~dp0"
echo.
echo === Caterium - GitHub setup ===
echo Repository: https://github.com/pavlov346346-source/caterium-app.git
echo.
where git >nul 2>nul
if errorlevel 1 (
echo Git for Windows is not installed.
echo Install it from https://git-scm.com/download/win and run this file again.
pause
exit /b 1
)
if not exist .git (
git init
)
git branch -M main
git config user.name "pavlov346346-source"
git config user.email "pavlov346346-source@users.noreply.github.com"
git remote get-url origin >nul 2>nul
if errorlevel 1 (
git remote add origin https://github.com/pavlov346346-source/caterium-app.git
) else (
git remote set-url origin https://github.com/pavlov346346-source/caterium-app.git
)
echo Checking release before commit...
call npm --version >nul 2>nul
if not errorlevel 1 (
if not exist node_modules call npm install
call npm run check:deploy
if errorlevel 1 (
echo QA failed. Nothing will be pushed.
pause
exit /b 1
)
) else (
echo Node.js not found - skipping local npm QA. GitHub/Cloudflare will run checks after push.
)
git add -A
git diff --cached --quiet
if errorlevel 1 (
git commit -m "Caterium v17.6.0 - GitHub Cloudflare autodeploy"
) else (
echo No new changes to commit.
)
echo.
echo Sending to GitHub. If this is the first time, Git Credential Manager may open your browser for GitHub sign-in.
git push -u origin main
if errorlevel 1 (
echo.
echo Push did not complete. If the repository already contains a README, run UPDATE-FROM-REMOTE-AND-PUSH.bat.
pause
exit /b 1
)
echo.
echo SUCCESS: GitHub repository updated.
echo Next: connect this repository in Cloudflare Workers Builds.
pause