From 5ab7824f5dceef32b586e00f2673cb0ef5a2e5a2 Mon Sep 17 00:00:00 2001 From: Cee Chen <549407+cee-chen@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:22:37 -0700 Subject: [PATCH] [Buildkite] Avoid deploying backport and prerelease tags (#7036) --- scripts/deploy/deploy_docs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/deploy/deploy_docs b/scripts/deploy/deploy_docs index 063a7e547ea..644c5bc0bc4 100755 --- a/scripts/deploy/deploy_docs +++ b/scripts/deploy/deploy_docs @@ -99,9 +99,9 @@ publish_to_bucket() if [[ "$1" != "nodocker" ]]; then ./scripts/deploy/build_docs - # we look this up to inject into the next docker run so it can decide whether - # we need to overwrite the root /index.html file with a new one. - CURRENT_RELEASE=$(git describe --tags "$(git rev-list --tags --max-count=1)") + # Get the latest tag on main, which will determine whether we deploy to the root `eui.elastic.co` bucket + # NOTE: specifying the main branch means we don't override prod with backport or prerelease tags. + CURRENT_RELEASE=$(git describe --tags "$(git rev-list --branches=main --tags --max-count=1)") echo "Current release: $CURRENT_RELEASE" # Run this script from inside the docker container, using google/cloud-sdk image