Skip to content

Commit 0ca1b4d

Browse files
authored
Don't crash the build when trying to docker-package from a shallow clone of a commit
1 parent 5cdcf44 commit 0ca1b4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/docker-package.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
set -ex
44

55
BRANCH=$(git rev-parse --abbrev-ref HEAD)
6-
DIST_VERSION=$(git describe --abbrev=0 --tags)
76

87
DIR=$(dirname "$0")
98

@@ -13,6 +12,8 @@ DIR=$(dirname "$0")
1312
if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]]
1413
then
1514
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
15+
else
16+
DIST_VERSION=$(git describe --abbrev=0 --tags)
1617
fi
1718

1819
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")

0 commit comments

Comments
 (0)