Files
cruciverba_1/create_passo4.bat

56 lines
1.3 KiB
Batchfile

@echo off
setlocal
cd /d "%~dp0"
set "BRANCH_NAME=passo4"
set "COMMIT_MSG=feat: consolida lessico semantico, temi controllati e filler a quota tematica"
if not "%~1"=="" (
set "COMMIT_MSG=%~1"
)
echo Repository: %cd%
echo Branch target: %BRANCH_NAME%
echo Commit message: %COMMIT_MSG%
echo.
git rev-parse --is-inside-work-tree >nul 2>nul
if errorlevel 1 (
echo Errore: questa cartella non e' un repository Git.
exit /b 1
)
git show-ref --verify --quiet refs/heads/%BRANCH_NAME%
if errorlevel 1 (
echo Creo il branch %BRANCH_NAME%...
git checkout -b %BRANCH_NAME%
) else (
echo Il branch %BRANCH_NAME% esiste gia', ci passo sopra...
git checkout %BRANCH_NAME%
)
if errorlevel 1 exit /b 1
echo.
echo Aggiungo le modifiche di progetto, escludendo cache Python e cache API...
git add *.py *.bat *.txt lexicon_it.json lexicon_it_semantic.json vocaboli_it_metadata.json package iwn-omw-main
if errorlevel 1 exit /b 1
echo.
echo Creo il commit...
git commit -m "%COMMIT_MSG%"
if errorlevel 1 (
echo.
echo Nessun commit creato. Potrebbe non esserci nulla di nuovo da salvare.
exit /b 1
)
echo.
echo Eseguo il push del branch %BRANCH_NAME%...
git push -u origin %BRANCH_NAME%
if errorlevel 1 exit /b 1
echo.
echo Operazione completata con successo.
endlocal