Skip to content

Commit 1293e87

Browse files
committed
fix(tag-template.sh): fix header display
1 parent 6a211f6 commit 1293e87

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

tag-template.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,23 @@ while true; do
4242
esac
4343
done
4444

45-
# Commit message section
45+
# Commit message section
46+
header=""
4647
massage=""
4748
if [ ! -z "$COMMENT_FLAG" ]; then
4849

49-
printf "\n${CYAN}>>> What new 🚀 features have been added ?${RESET}\n"
50+
printf "\n${CYAN}>>> Write a short description about this tag.${RESET}\n"
51+
while :; do
52+
read -e input
53+
if [ -z "$input" ]; then
54+
printf "${RED}❌ Header can not be empty.${RESET}\n"
55+
else
56+
header="$input"
57+
break
58+
fi
59+
done
60+
61+
printf "\n${CYAN}>>> What new 🚀 features have been added (optional)?${RESET}\n"
5062
read -e features
5163
if [ ! -z "$features" ]; then
5264
massage="
@@ -55,7 +67,7 @@ if [ ! -z "$COMMENT_FLAG" ]; then
5567
"
5668
fi
5769

58-
printf "\n${CYAN}>>> Which 🐛 bugs have been fixed ?${RESET}\n"
70+
printf "\n${CYAN}>>> Which 🐛 bugs have been fixed (optional)?${RESET}\n"
5971
read -e fixes
6072
if [ ! -z "$fixes" ]; then
6173
massage="${massage}
@@ -64,7 +76,7 @@ if [ ! -z "$COMMENT_FLAG" ]; then
6476
"
6577
fi
6678

67-
printf "\n${CYAN}>>> What 🧪 tests have been added ?${RESET}\n"
79+
printf "\n${CYAN}>>> What 🧪 tests have been added (optional)?${RESET}\n"
6880
read -e tests
6981
if [ ! -z "$tests" ]; then
7082
massage="${massage}
@@ -73,7 +85,7 @@ if [ ! -z "$COMMENT_FLAG" ]; then
7385
"
7486
fi
7587

76-
printf "\n${CYAN}>>> 💭 Other explanations you want to add.${RESET}\n"
88+
printf "\n${CYAN}>>> 💭 Other explanations you want to add (optional).${RESET}\n"
7789
read -e others
7890
if [ ! -z "$others" ]; then
7991
massage="${massage}
@@ -83,7 +95,10 @@ if [ ! -z "$COMMENT_FLAG" ]; then
8395
fi
8496
fi
8597

86-
printf "\n${GREEN}v${version}\n${massage}\n${RESET}"
98+
printf "\n${GREEN}v${version} ${header}\n${massage}\n${RESET}"
99+
massage="${header}
100+
101+
${massage}"
87102

88103
# Git tag
89104
if [ $? == 0 ]; then

0 commit comments

Comments
 (0)