26 lines
703 B
Batchfile
26 lines
703 B
Batchfile
@echo off
|
|
REM Manual push helper: pushes whatever is already committed in _deploy.
|
|
REM Tries HTTPS first, then direct LAN. Use after a failed push, or to re-push.
|
|
setlocal
|
|
set OWNER=jessikitty
|
|
set REPO=newbury-exhibit
|
|
set BRANCH=dev
|
|
set LAN_REMOTE=http://10.0.0.55:3000/%OWNER%/%REPO%.git
|
|
set SRC=%~dp0
|
|
|
|
if not exist "%SRC%_deploy" (
|
|
echo No _deploy checkout found. Run upload-to-gitea.bat first.
|
|
pause & exit /b 1
|
|
)
|
|
pushd "%SRC%_deploy"
|
|
echo Pushing %BRANCH% via HTTPS...
|
|
git push origin %BRANCH%
|
|
if errorlevel 1 (
|
|
echo HTTPS failed, trying direct LAN...
|
|
git push "%LAN_REMOTE%" %BRANCH%
|
|
if errorlevel 1 ( echo ERROR: push failed on both. & popd & pause & exit /b 1 )
|
|
)
|
|
echo Done.
|
|
popd
|
|
pause
|