Skip to content

Commit

Permalink
chore(packaging): set tag length to 7 (grafana#901)
Browse files Browse the repository at this point in the history
* chore(packaging): set tag length to 7

relied on git approximation before, which causes problems with other parts of
the automation.

Because we do not need the tag to be strictly unique, but just to identify the
latest version, limiting to 7 is fine.

If this ever causes problems, raise the limit but make sure to update all other
places as well.

* chore(packaging): request at least 7 characters

Co-Authored-By: Dan Cech <[email protected]>
  • Loading branch information
sh0rez and DanCech authored Aug 15, 2019
1 parent b2fe044 commit 205b433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/image-tag
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail

WIP=$(git diff --quiet || echo '-WIP')
BRANCH=$(git rev-parse --abbrev-ref HEAD | sed s#/#-#g)
SHA=$(git rev-parse --short HEAD)
SHA=$(git rev-parse --short=7 HEAD | head -c7)
# If this is a tag, use it, otherwise branch-hash
TAG=$(git describe --exact-match 2> /dev/null || echo "${BRANCH}-${SHA}")
Expand Down

0 comments on commit 205b433

Please sign in to comment.