Skip to content

Commit f0eb330

Browse files
committed
Fixes a bug in the Jenkins pipeline
Jenkins cannot run git commands; it fixes a bug introduced with PR #181. Signed-off-by: Fulvio Risso <fulvio.risso@polito.it>
1 parent 3b4323a commit f0eb330

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/install.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,16 @@ echo "Install polycube"
140140
cd $DIR/..
141141
if [ "$INSTALL_CLEAN_POLYCUBE" == true ] ; then
142142
$SUDO rm -rf build
143+
else
144+
# The above commands are executed only in case of a manual install;
145+
# Jenkins runs this script with "$INSTALL_CLEAN_POLYCUBE" = true
146+
# The above commands are useful in case you are re-running this
147+
# script on an existing install, i.e., update source code and
148+
# all the submodules
149+
git pull
150+
git submodule update --init --recursive
143151
fi
144152

145-
# Update submodules; useful in case you are re-running
146-
# this script on an existing install
147-
git submodule update --init --recursive
148-
149153
mkdir -p build && cd build
150154
git log -1
151155

0 commit comments

Comments
 (0)