This commit is contained in:
Dan Hawkins 2019-04-02 09:07:32 +01:00
commit 6a80613f97

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