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 11#! /bin/bash
22
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+
39# Color formatting
410RED=" \033[0;31m"
511GREEN=" \033[0;32m"
122128printf " ${massage} \n${RESET} "
123129
124130# 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}
128140
129141${long_desc}
130142${breaking_changes}
131143${closed_issues} "
144+ fi
132145else
133146 printf " \n${RED} ❌ An error occurred. Please try again.${RESET} \n"
134147 exit 1
135148fi
149+
You can’t perform that action at this time.
0 commit comments