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 branches found
No related tags found
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
- *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
......
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