有运维需求,将gitlab代码仓库的代码检出到svn用于自动构建,本地电脑为windows环境,脚本:
git clone ssh://git@ip:10022/bimplatform/bimconstruction.git
git clone ssh://git@ip:10022/bimplatform/largescreen.git
git clone ssh://git@ip:10022/bimplatform/mobile.git
git clone ssh://git@ip:10022/bimplatform/web.git
rd /s /q .\bimconstruction\.git
rd /s /q .\largescreen\.git
rd /s /q .\mobile\.git
rd /s /q .\web\.git
svn co svn://ip:13690/spring --username username --password password --no-auth-cache
xcopy .\bimconstruction .\spring\bimconstruction\ /e /y /h /r /q
xcopy .\largescreen .\spring\largescreen\ /e /y /h /r /q
xcopy .\mobile .\spring\mobile\ /e /y /h /r /q
xcopy .\web .\spring\web\ /e /y /h /r /q
cd spring
svn add . --no-ignore --force
svn commit -m "git to svn auto" -q
cd ../
::rd /s /q .\bimconstruction\
::rd /s /q .\largescreen\
::rd /s /q .\mobile\
::rd /s /q .\web\
::rd /s /q .\spring\
pause