aboutsummaryrefslogtreecommitdiff
path: root/commit.sh
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-11-05 10:26:35 -0400
committerBobby <[email protected]>2022-11-05 10:26:35 -0400
commit53d051d3ae76e3608be6ddcae81afb61238e1a64 (patch)
tree580757f88a6b7818262ecb84c9925cbf35813620 /commit.sh
parentd0dd22842400e43208356f603814bea425a395be (diff)
downloadtexty-53d051d3ae76e3608be6ddcae81afb61238e1a64.tar.xz
texty-53d051d3ae76e3608be6ddcae81afb61238e1a64.zip
fix: Fixed Scripts
Diffstat (limited to 'commit.sh')
-rwxr-xr-xcommit.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/commit.sh b/commit.sh
index 7370c0c..8818d46 100755
--- a/commit.sh
+++ b/commit.sh
@@ -15,8 +15,6 @@
# This script should return 0 if the commit should proceed or 1 if
# the commit should be aborted.
-!#/bin/sh
-
set -e
# Get the current branch name
@@ -35,7 +33,6 @@ helpFuntion() {
exit $1
}
-
# User Defined Commands
commands() {
# Add commands here
@@ -46,10 +43,10 @@ commands() {
python3 -m isort .
# Format code
- python3 black .
+ python3 -m black .
# Generate Requirements.txt
- pipreqs --force .
+ pipreqs ./ --ignore .venv
# Generate Maintainers List
python3 scripts/maintainers.py
@@ -63,6 +60,7 @@ branch=$(git rev-parse --abbrev-ref HEAD)
commit() {
# Run User Defined Commands
commands
+
# Check if the branch is the current branch
if [ "$branch" == "$(git rev-parse --abbrev-ref HEAD)" ]
then
@@ -79,6 +77,9 @@ commit() {
git commit -m "$msg"
git push origin $branch
fi
+
+ # exit with success
+ exit 0
}
# Check if the number of arguments is less than 2