aboutsummaryrefslogtreecommitdiff
path: root/commit.sh
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-11-05 02:12:06 -0400
committerBobby <[email protected]>2022-11-05 02:12:06 -0400
commitccad8963ece68a1b598bcce4a41f42b6d8994712 (patch)
tree44055648faadb727006f70e1c6b5665cc3d5f7ed /commit.sh
parent33d1157611299bda066dbc5ca8cdcee5ed2b84f2 (diff)
downloadtexty-ccad8963ece68a1b598bcce4a41f42b6d8994712.tar.xz
texty-ccad8963ece68a1b598bcce4a41f42b6d8994712.zip
feat: Added support for virtual envs
Diffstat (limited to 'commit.sh')
-rwxr-xr-xcommit.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/commit.sh b/commit.sh
index 5093398..4d87cd6 100755
--- a/commit.sh
+++ b/commit.sh
@@ -40,12 +40,8 @@ commands() {
# Example:
# echo "Hello World"
- # Generate Requirements.txt, delete the old one if it exists
- if [ -f requirements.txt ]
- then
- rm requirements.txt
- fi
- pip3 freeze > requirements.txt
+ # Generate Requirements.txt
+ pipreqs --force .
}
# Default values for optional arguments
@@ -136,13 +132,13 @@ fi
if [[ $type =~ ^(feat|fix|docs|style|refactor|perf|test|chore|revert)$ ]]
then
# If type is valid, run commit function
- commit $files "$message" $type $branch
+ commit "$files" "$message" $type $branch
else
# If type is invalid, prompt the to use the default type
read -p "Invalid type. Do you want to use the default type "feat"? (y/n): " useDefaultType
if [[ $useDefaultType =~ ^[Yy]$ ]] || [[ $useDefaultType =~ ^[Yy][Ee][Ss]$ ]]
then
- commit $files "$message" $type $branch
+ commit "$files" "$message" $type $branch
else
echo "Commit aborted"
exit 1