branch-repo: Give tag a better description

When we are using the script for tagging only make sure we use a better
description of the tag since it's the Release tag vs the Branching tag.

Change-Id: I50f34c818c650a422d415b084a42345307baa5c8
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Saul Wold 2020-08-05 07:42:29 -07:00
parent ec05ee0dfb
commit f32c3e5b09
1 changed files with 7 additions and 1 deletions

View File

@ -128,6 +128,7 @@ function branch_repo {
local sha=$3
local branch=$4
local tag=${5:-""}
local branch_created=0
local repo_dir
if [[ -n $SKIP_PATH || "$path" == "-" ]]; then
@ -154,11 +155,16 @@ function branch_repo {
if ! git branch | grep ${branch}$; then
# Create the new branch if it does not exist
git branch $branch $sha
branch_created=1
fi
if [[ -n $tag ]]; then
# tag branch point at $sha
git tag -s -m "Branch $branch" -f $tag $sha
if [ $branch_created -eq 1 ]; then
git tag -s -m "Branch $branch" -f $tag $sha
else
git tag -s -m "Tag $tag Release" -f $tag $sha
fi
fi
# Push the new goodness back up