File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # Check the current folder is a git repository
4
+ $( git -C $PWD rev-parse)
5
+ if [[ $? != 0 ]]; then
6
+ exit 1
7
+ fi
8
+
3
9
# Color formatting
4
10
RED=" \033[0;31m"
5
11
GREEN=" \033[0;32m"
122
128
printf " ${massage} \n${RESET} "
123
129
124
130
# Git commit
125
- result_code=$?
126
- if [ " $result_code " = 0 ]; then
127
- git commit -m " ${type_var}${scope} : ${short_desc}
131
+ if [ $? == 0 ]; then
132
+ if [[ $1 == " -s" ]] || [[ $1 == " sign" ]]; then
133
+ git commit -S -m " ${type_var}${scope} : ${short_desc}
134
+
135
+ ${long_desc}
136
+ ${breaking_changes}
137
+ ${closed_issues} "
138
+ else
139
+ git commit -m " ${type_var}${scope} : ${short_desc}
128
140
129
141
${long_desc}
130
142
${breaking_changes}
131
143
${closed_issues} "
144
+ fi
132
145
else
133
146
printf " \n${RED} ❌ An error occurred. Please try again.${RESET} \n"
134
147
exit 1
135
148
fi
149
+
You can’t perform that action at this time.
0 commit comments