Skip to content
Snippets Groups Projects
Commit 777fcfc0 authored by Xiang Dai's avatar Xiang Dai Committed by Robert Fratto
Browse files

optimize image tag script (#911)


* add quota for sed

Signed-off-by: default avatarXiang Dai <764524258@qq.com>

* add comment for head

Signed-off-by: default avatarXiang Dai <764524258@qq.com>
parent 52efdfdf
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,9 @@ set -o nounset
set -o pipefail
WIP=$(git diff --quiet || echo '-WIP')
BRANCH=$(git rev-parse --abbrev-ref HEAD | sed s#/#-#g)
BRANCH=$(git rev-parse --abbrev-ref HEAD | sed 's#/#-#g')
# When 7 chars are not enough to be unique, git automatically uses more.
# We are forcing to 7 here, as we are doing for grafana/grafana as well.
SHA=$(git rev-parse --short=7 HEAD | head -c7)
# If this is a tag, use it, otherwise branch-hash
......
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