Skip to content

Commit 55a4110

Browse files
committed
add warning
1 parent 4b3e1c2 commit 55a4110

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jenkins.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
2+
if [ "$JENKINS_URL" == ""]
3+
then
4+
echo "Looks like we're not being run by Jenkins, this is dangerous"
5+
echo "due to use of git clean -fdx command."
6+
exit 1
7+
fi
28
cloneorpull() {
39
if test -d "$1" ; then
410
(cd "$1" && git pull)

0 commit comments

Comments
 (0)