42 lines
996 B
Batchfile
42 lines
996 B
Batchfile
REM Script di replica rami git
|
|
ECHO off
|
|
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
|
|
|
|
if %pushRemote% == 0 ( goto case_0 )
|
|
if %pushRemote% == 1 ( goto case_1 )
|
|
if %pushRemote% == 2 ( goto case_2 )
|
|
if %pushRemote% == 3 ( goto case_3 )
|
|
|
|
REM Faccio push condizionali
|
|
:case_0
|
|
git push . %baseBranch%:develop
|
|
goto end_call
|
|
|
|
:case_1
|
|
git push . %baseBranch%:master
|
|
git push gitlab.steamware %baseBranch%:%baseBranch%
|
|
git push gitlab.steamware %baseBranch%:develop
|
|
goto end_call
|
|
|
|
:case_2
|
|
git push . %baseBranch%:beta
|
|
git push gitlab.steamware %baseBranch%:master
|
|
git push gitlab.steamware %baseBranch%:beta
|
|
goto end_call
|
|
|
|
|
|
:case_3
|
|
git push . %baseBranch%:stable
|
|
git push gitlab.steamware %baseBranch%:stable
|
|
goto end_call
|
|
|
|
:end_call
|
|
ECHO on
|
|
REM Done! |