ITSERR_workbench/push_workbench.bat

45 lines
900 B
Batchfile

@echo off
cd /d "%~dp0"
:: Colore e titolo
title ITSERR Workbench - Commit & Push
color 1F
echo ===========================================
echo ITSERR Workbench - Commit & Push Script
echo ===========================================
echo.
:: Controlla se Git è disponibile
where git >nul 2>nul
if %errorlevel% neq 0 (
echo Errore: Git non trovato nel PATH.
echo Installa Git for Windows da https://git-scm.com/download/win
pause
exit /b
)
:: Chiede il messaggio di commit
set /p commitmsg=Inserisci messaggio di commit:
if "%commitmsg%"=="" (
echo Nessun messaggio inserito. Operazione annullata.
pause
exit /b
)
echo.
echo Aggiungo tutti i file modificati...
git add -A
echo.
echo Creo il commit con messaggio: "%commitmsg%"
git commit -m "%commitmsg%"
echo.
echo Spingo le modifiche su Gitea...
git push
echo.
echo Operazione completata con successo.
pause