43 lines
949 B
Batchfile
43 lines
949 B
Batchfile
REM Script di replica rami git
|
|
ECHO on
|
|
REM l'argomento è il replication level:
|
|
REM 0 = locale (current + dev)
|
|
REM 1 = (0) + locale (master) + remoto (current + dev)
|
|
REM 2 = (1) + locale (beta) + remoto (master + beta)
|
|
REM 3 = (2) + locale (stable) + remoto (stable)
|
|
|
|
set baseBranch=%1
|
|
set pushRemote=%2
|
|
|
|
git push . %baseBranch%:develop
|
|
|
|
REM Faccio push condizionali
|
|
if %pushRemote% == 0 ( goto end )
|
|
|
|
if %pushRemote% == 1 ( goto case_1 )
|
|
|
|
if %pushRemote% == 2 ( goto case_2 )
|
|
|
|
if %pushRemote% == 3 ( goto case_3 )
|
|
|
|
case_1:
|
|
git push . %baseBranch%:master
|
|
git push gitlab.steamware %baseBranch%:%baseBranch%
|
|
git push gitlab.steamware %baseBranch%:develop
|
|
goto end
|
|
|
|
case_2:
|
|
git push . %baseBranch%:beta
|
|
git push gitlab.steamware %baseBranch%:master
|
|
git push gitlab.steamware %baseBranch%:beta
|
|
goto end
|
|
|
|
|
|
case_3:
|
|
git push . %baseBranch%:stable
|
|
git push gitlab.steamware %baseBranch%:stable
|
|
goto end
|
|
|
|
end:
|
|
ECHO on
|
|
REM Done! |