🚀 chore(commit): use same scripts + validation

This commit is contained in:
Eshan Roy
2024-06-03 06:00:12 +05:30
committed by GitHub
parent 707d6e40c6
commit 0c952119db

25
push.sh
View File

@@ -1,31 +1,18 @@
#!/bin/bash #!/bin/bash
# Author : Eshan Roy # Iconized
# URI : https://eshanized.github.io
# NOTE: If you are on Snigdha OS, pull_from_github(){
# you can install commitizen-go with `sudo pacman -S commitizen-go` git pull
# or `s commitizen-go`. Else you need to install `yay` or `yay-bin`
# to install commitizen. I have written this script only for *Arch Linux.
# Function to check if Commitizen is installed
check_commitizen() {
if ! pacman -Qq commitizen-go &> /dev/null; then
echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2
exit 1
fi
} }
# Function to stage, commit, and push changes
push_to_github() { push_to_github() {
git add . ezcommits
git cz git push -u origin master
git push origin master
} }
# Main Function
main(){ main(){
check_commitizen pull_from_github
push_to_github push_to_github
} }