Jump to content

Before-Checkin trigger allowing the check-in to update the changes which it's shouldn't on .bat returning exit code:1


Raghu

Recommended Posts

Hi

I am working on before check-in trigger with below command.

cm maketrigger checkin-before "code-checkin" "C:\batfile\build.bat" --filter="repo:RepoTest,*"

____________________________________________________________________________________________________________________________________________________________________________________

My .bat file looks like below, which gives exit code of 1 with failure log details, when i run on my command promt. This just compilesa maven java code and puts the log into my log file.

echo @off

cd C:\<path>\wkspaces\RepoTest
call mvn clean compile --log-file C:\batfile\log_mvn.txt
echo Exit Code = %ERRORLEVEL%
if not "%ERRORLEVEL%" == "0" exit /b

____________________________________________________________________________________________________________________________________________________________________________________

But when i call it using above trigger and checking in, it's executing with failure log recorded and it's allowing the repository to update the changes of the check-in, which it eventually shouldn't allow to check-in.

Please let me understand where am i missing.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...