diff --git a/user_config/docs/.gitlab-ci.yml b/user_config/docs/.gitlab-ci.yml index 5bab53445808bdd650b50dec78c42eb86d2132f1..0d5b8e63d60cd0df4951cecc91e7fd32a25627f7 100644 --- a/user_config/docs/.gitlab-ci.yml +++ b/user_config/docs/.gitlab-ci.yml @@ -316,11 +316,12 @@ script_deploy_html: &script_deploy_html - *before_script_prepare_deployment script: - 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 export LAST_TAG="-1.-1" 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%.*}" fi @@ -360,7 +361,7 @@ script_deploy_html: &script_deploy_html then cp tmp/${RSYNC_PATH}/versions.json tmp/${RSYNC_PATH}/../versions.json fi - - ln -s "${LAST_TAG}" "latest" + - ln -s -- "${LAST_TAG}" "latest" - mv "latest" "tmp/${PROJECT_PATH}" - echo -e " <!DOCTYPE html>\n