perf(pull): pull first then push

Signed-off-by: Abhiraj Roy <157954129+iconized@users.noreply.github.com>
This commit is contained in:
Abhiraj Roy
2024-06-03 01:31:03 +05:30
parent da7def9f9d
commit fe9fbc8592

View File

@@ -9,6 +9,10 @@
# to install commitizen. I have written this script only for *Arch Linux. # to install commitizen. I have written this script only for *Arch Linux.
# Function to check if Commitizen is installed # Function to check if Commitizen is installed
pull_from_github(){
git pull
}
check_commitizen() { check_commitizen() {
if ! pacman -Qq commitizen-go &> /dev/null; then if ! pacman -Qq commitizen-go &> /dev/null; then
echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2 echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2
@@ -25,6 +29,7 @@ push_to_github() {
# Main Function # Main Function
main() { main() {
pull_from_github
check_commitizen check_commitizen
push_to_github push_to_github
} }