Skip to content
Snippets Groups Projects
Verified Commit fdd97a26 authored by Romain Deville's avatar Romain Deville
Browse files

:green_heart: Fix user_config docs/.gitlab-ci.yml when no git TAG

parent 4d343294
No related merge requests found
Pipeline #9432 passed with stages
in 12 minutes and 54 seconds
...@@ -316,11 +316,12 @@ script_deploy_html: &script_deploy_html ...@@ -316,11 +316,12 @@ script_deploy_html: &script_deploy_html
- *before_script_prepare_deployment - *before_script_prepare_deployment
script: script:
- git fetch --all - git fetch --all
- export LAST_TAG="$(git describe --tags `git rev-list --tags --max-count=1`)" - |
- if [[ -z "${LAST_TAG}" ]] if ! git describe --tags `git rev-list --tags --max-count=1`
then then
export LAST_TAG="-1.-1" export LAST_TAG="-1.-1"
else else
export LAST_TAG="$(git describe --tags `git rev-list --tags --max-count=1`)"
export LAST_TAG="${LAST_TAG/v/}" export LAST_TAG="${LAST_TAG/v/}"
export LAST_TAG="${LAST_TAG%.*}" export LAST_TAG="${LAST_TAG%.*}"
fi fi
...@@ -360,7 +361,7 @@ script_deploy_html: &script_deploy_html ...@@ -360,7 +361,7 @@ script_deploy_html: &script_deploy_html
then then
cp tmp/${RSYNC_PATH}/versions.json tmp/${RSYNC_PATH}/../versions.json cp tmp/${RSYNC_PATH}/versions.json tmp/${RSYNC_PATH}/../versions.json
fi fi
- ln -s "${LAST_TAG}" "latest" - ln -s -- "${LAST_TAG}" "latest"
- mv "latest" "tmp/${PROJECT_PATH}" - mv "latest" "tmp/${PROJECT_PATH}"
- echo -e " - echo -e "
<!DOCTYPE html>\n <!DOCTYPE html>\n
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment