Skip to content

Commit

Permalink
trim - from the end of branches (#25)
Browse files Browse the repository at this point in the history
* trim - from the end of branches
  • Loading branch information
jgreat authored Feb 22, 2023
1 parent 84c58dc commit 3b0859f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ EOF
then
cut_branch=$(echo "${normalized_branch}" | cut -c -${cutoff})
echo "Your branch name ${normalized_branch} + metadata exceeds the maximum length for K8s identifiers, truncating to ${cut_branch}"
normalized_branch="${cut_branch}"
# cut branch should not end in - trim any dashes from the end.
normalized_branch="${cut_branch%%*(-)}"
fi

echo "Before: '${branch}'"
Expand Down

0 comments on commit 3b0859f

Please sign in to comment.