这段代码是否可以在Jenkins上运行而没有任何问题?

时间:2017-06-02 06:26:17

标签: svn jenkins

如果URL没有特定文件夹,此代码会导致Jenkins出错吗?

@echo off
set tempTagFolderName=TempTag/
set trunkFolderName=trunk/
set tempTagPath=https://raptorjung/svn/SvnTempTest/branches/TempTag/
set branchPath=https://raptorjung/svn/SvnTempTest/branches/
set trunkPath=https://raptorjung/svn/SvnTempTest/trunk/
set headPath=https://raptorjung/svn/SvnTempTest/

svn info %tempTagPath% > NUL 2>&1

if %ERRORLEVEL% == 0 (
    svn del %tempTagPath% -m "Remove the TempTag"
) else (
    echo [Notice]TempTag does not exist so creates new one...
)

svn list %trunkPath% > NUL 2>&1

if %ERRORLEVEL% == 0 (
    svn cp %trunkPath% %tempTagPath% -m "Move trunk to TempTag in branches"
) else (
    echo Trunk does not exist, therefore exit the program
    end
)

pause

0 个答案:

没有答案