mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-24 19:09:06 +01:00
CI: Improve version detection on building doc
This commit is contained in:
parent
5e17a8ec81
commit
0eb73ee5bf
1 changed files with 10 additions and 2 deletions
|
@ -171,7 +171,11 @@ build:doc:html:
|
||||||
- apk add make git
|
- apk add make git
|
||||||
- git config user.name $GITLAB_USER_NAME
|
- git config user.name $GITLAB_USER_NAME
|
||||||
- git config user.email $GITLAB_USER_EMAIL
|
- 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
|
- cd doc
|
||||||
- git fetch origin $DOC_BRANCH
|
- git fetch origin $DOC_BRANCH
|
||||||
- git rev-parse --verify $DOC_BRANCH && git branch -D $DOC_BRANCH || echo "No existing local git $DOC_BRANCH 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
|
- apk add git
|
||||||
- git config user.name $GITLAB_USER_NAME
|
- git config user.name $GITLAB_USER_NAME
|
||||||
- git config user.email $GITLAB_USER_EMAIL
|
- 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
|
- cd doc
|
||||||
- git fetch origin $DOC_BRANCH
|
- git fetch origin $DOC_BRANCH
|
||||||
- git rev-parse --verify $DOC_BRANCH && git branch -D $DOC_BRANCH || echo "No existing local git $DOC_BRANCH branch"
|
- git rev-parse --verify $DOC_BRANCH && git branch -D $DOC_BRANCH || echo "No existing local git $DOC_BRANCH branch"
|
||||||
|
|
Loading…
Reference in a new issue