diff --git a/before_build.sh b/before_build.sh
index 5e61c12b8e58db5ff8eb9bd0a899161d26c7fdc2..c9b4d16030a467cb85e5dc75b245a17bd4aaaec9 100755
--- a/before_build.sh
+++ b/before_build.sh
@@ -10,9 +10,9 @@ for pkg in bob `cat requirements.txt | sed -e '/^\s*#.*/d;/^\s*$/d'`; do
     git clone --depth 1 ${GITLAB_CHECKOUT_STRATEGY}bob/$pkg doc/$pkg || \
     { git -C doc/$pkg reset --hard HEAD && \
     git -C doc/$pkg checkout master && \
-    git -C doc/$pkg pull }
+    git -C doc/$pkg pull; }
     if [[ -n "${CI_COMMIT_TAG}" ]]; then
-      tag=`git -C doc/$pkg tag -l --sort=v:refname | tail -n 1`
+      tag=`git -C doc/$pkg tag -l --sort="v:refname" | tail -n 1`
       git -C doc/$pkg checkout $tag
     fi
 done