Files
spark/tools/git_switch_linux.cmd
T

17 lines
432 B
Batchfile

@echo off
@setlocal
SETLOCAL
if "%SPARKVM_PORT%"=="" set SPARKVM_PORT=22
if "%1" == "" (
for /F "tokens=2" %%m in ('git branch --points-at head') do set branch=%%m
) else (
set branch=%1
)
echo.
echo branch=%branch%
ssh bts@sparkvm -p %SPARKVM_PORT% -o StrictHostKeyChecking=no -t "cd /home/bts/spark ; git reset --hard ; git clean -fd ; git checkout %branch% ; git pull ; git submodule update"
ENDLOCAL
goto :eof