This commit is contained in:
Dan Hawkins 2019-04-02 17:35:42 +01:00
commit f3eab5895f

View file

@ -56,7 +56,20 @@ def String checkouttoreporoot(String gitURL) {
submoduleCfg: [],
])
} else {
echo "Found ${gitURL} checked out at ${reporootsubfolder}"
echo "Found ${gitURL} checked out at ${reporootsubfolder} ... checking status"
dir(reporootsubfolder) {
if (isUnix()) {
sh """
git status
if [ \$? -ne 0 ]; then exit 1; fi
"""
} else {
bat """
git status
if errorlevel 1 EXIT /b 1
"""
}
}
}
}
return reporootsubfolder