From 3d692ba3227aed42657491a05db01cac32d54de9 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Thu, 2 May 2024 21:28:27 +0530 Subject: [PATCH] test: creating a sample push script with commitizen validation. --- test-push.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test-push.sh diff --git a/test-push.sh b/test-push.sh new file mode 100755 index 0000000..261ebdf --- /dev/null +++ b/test-push.sh @@ -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