mirror of
https://github.com/Snigdha-OS/snigdhaos-arctic.git
synced 2025-09-20 19:45:01 +02:00
test: creating a sample push script with commitizen validation.
This commit is contained in:
24
test-push.sh
Executable file
24
test-push.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 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() {
|
||||||
|
git add .
|
||||||
|
git cz
|
||||||
|
git push origin master
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main script
|
||||||
|
main() {
|
||||||
|
check_commitizen
|
||||||
|
push_to_github
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
Reference in New Issue
Block a user