mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-06 20:55:18 +02:00
refactor(script): change the static script with new commitizen validation
This commit is contained in:
35
iconized.sh
35
iconized.sh
@@ -1,9 +1,32 @@
|
|||||||
#!/usr/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# EXECUTE AT YOUR OWN RISK
|
# Author : Eshan Roy
|
||||||
|
# URI : https://eshanized.github.io
|
||||||
|
|
||||||
# Git Push
|
# NOTE: If you are on Snigdha OS,
|
||||||
git add .
|
# you can install commitizen-go with `sudo pacman -S commitizen-go`
|
||||||
git commit -m "👽 @iconized made a new commit!"
|
# or `s commitizen-go`. Else you need to install `yay` or `yay-bin`
|
||||||
git push origin master
|
# 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() {
|
||||||
|
git add .
|
||||||
|
git cz
|
||||||
|
git push origin master
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main Function
|
||||||
|
main() {
|
||||||
|
check_commitizen
|
||||||
|
push_to_github
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
34
push.sh
34
push.sh
@@ -1,10 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Author: Eshan Roy (Eshanized)
|
# Author : Eshan Roy
|
||||||
|
# URI : https://eshanized.github.io
|
||||||
|
|
||||||
BRANCH=master
|
# NOTE: If you are on Snigdha OS,
|
||||||
CMSG="⏳ @eshanized updated the Website!!!"
|
# you can install commitizen-go with `sudo pacman -S commitizen-go`
|
||||||
|
# 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.
|
||||||
|
|
||||||
git add .
|
# Function to check if Commitizen is installed
|
||||||
git commit -m "${CMSG}"
|
check_commitizen() {
|
||||||
# git push origin "${BRANCH}"
|
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 Function
|
||||||
|
main() {
|
||||||
|
check_commitizen
|
||||||
|
push_to_github
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
Reference in New Issue
Block a user