From 258bab0e944b7ea86d58b53deead93d518a064e0 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Thu, 19 Apr 2018 14:02:18 +0200 Subject: [PATCH] fetch the tags first --- before_build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/before_build.sh b/before_build.sh index c9b4d16..f237b1f 100755 --- a/before_build.sh +++ b/before_build.sh @@ -12,8 +12,9 @@ for pkg in bob `cat requirements.txt | sed -e '/^\s*#.*/d;/^\s*$/d'`; do git -C doc/$pkg checkout master && \ git -C doc/$pkg pull; } if [[ -n "${CI_COMMIT_TAG}" ]]; then - tag=`git -C doc/$pkg tag -l --sort="v:refname" | tail -n 1` - git -C doc/$pkg checkout $tag + git -C doc/$pkg fetch --tags + tag=`git -C doc/$pkg tag -l --sort="v:refname" | tail -n 1` + git -C doc/$pkg checkout $tag fi done -- GitLab