From ae2c1634415dcd3f53af2291ca0830e59625f64f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 5 Sep 2022 09:35:16 +0100 Subject: [PATCH] Fix if condition for deciding how to structure docker version file (#23186) --- scripts/docker-package.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/docker-package.sh b/scripts/docker-package.sh index 3beb01151c..90875366c2 100755 --- a/scripts/docker-package.sh +++ b/scripts/docker-package.sh @@ -7,8 +7,10 @@ DIST_VERSION=$(git describe --abbrev=0 --tags) DIR=$(dirname "$0") -# If we're not using custom SDKs and on a branch other than master, generate a version akin go develop.element.io -if [[ $USE_CUSTOM_SDKS == false ]] && [[ $BRANCH != 'master' ]] +# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not* +# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to +# a few SHAs rather than a version. +if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]] then DIST_VERSION=$("$DIR"/get-version-from-git.sh) fi