diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2002fa63..2f0d57cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -171,7 +171,11 @@ build:doc:html: - apk add make git - git config user.name $GITLAB_USER_NAME - git config user.email $GITLAB_USER_EMAIL - - VERSION=`git describe --tags` + - | + VERSION=$( + git describe --tags 2> /dev/null || \ + echo "0.0-$( git log --oneline|wc -l )-$( git describe --tags --always )" + ) - cd doc - git fetch origin $DOC_BRANCH - git rev-parse --verify $DOC_BRANCH && git branch -D $DOC_BRANCH || echo "No existing local git $DOC_BRANCH branch" @@ -236,7 +240,11 @@ build:doc:append_additional_versions: - apk add git - git config user.name $GITLAB_USER_NAME - git config user.email $GITLAB_USER_EMAIL - - VERSION=`git describe --tags` + - | + VERSION=$( + git describe --tags 2> /dev/null || \ + echo "0.0-$( git log --oneline|wc -l )-$( git describe --tags --always )" + ) - cd doc - git fetch origin $DOC_BRANCH - git rev-parse --verify $DOC_BRANCH && git branch -D $DOC_BRANCH || echo "No existing local git $DOC_BRANCH branch"