From 16ba6461f7c798cb47d0bf0d76a1c48498fe141e Mon Sep 17 00:00:00 2001 From: Eshan Roy Date: Tue, 26 Nov 2024 16:05:16 +0530 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A8=20refactor(=5Fdev):=20add=20sc?= =?UTF-8?q?ripts=20for=20conv.=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git-config.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ push.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100755 git-config.sh create mode 100755 push.sh diff --git a/git-config.sh b/git-config.sh new file mode 100755 index 0000000..ece8d8a --- /dev/null +++ b/git-config.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Author: Eshan Roy +# Description: This script configures GitHub user email and username. + +set -e + +# Function to display usage +usage() { + echo "Usage: ${0##*/} [--email ] [--username ] [-h]" + echo " --email Set the GitHub user email." + echo " --username Set the GitHub username." + echo " -h Display this help message." + exit 1 +} + +# Parse command line arguments +while [[ "$#" -gt 0 ]]; do + case "$1" in + --email) + EMAIL="$2" + shift 2 + ;; + --username) + USERNAME="$2" + shift 2 + ;; + -h|--help) + usage + ;; + *) + echo "Unknown parameter passed: $1" + usage + ;; + esac +done + +# Prompt for email if not provided +if [ -z "$EMAIL" ]; then + read -p "Enter your GitHub email: " EMAIL +fi + +# Prompt for username if not provided +if [ -z "$USERNAME" ]; then + read -p "Enter your GitHub username: " USERNAME +fi + +# Set the Git configuration +git config --global user.email "$EMAIL" +git config --global user.name "$USERNAME" + +# Confirmation message +echo "GitHub configuration updated:" +echo " User Email: $EMAIL" +echo " Username: $USERNAME" \ No newline at end of file diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..bc6d7e7 --- /dev/null +++ b/push.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# Author : ESHAN ROY +# Author URI : https://eshanized.github.io + +# NOTE : RUN AT YOUR OWN RISK! + +# Define the conventional commit types with emojis +TYPES=("๐ŸŽ‰ feat" "๐Ÿž fix" "๐Ÿ“š docs" "๐Ÿ’… style" "๐Ÿ”จ refactor" "โšก๏ธ perf" "๐Ÿงช test" "๐Ÿ› ๏ธ build" "๐Ÿค– ci" "๐Ÿงน chore" "โช๏ธ revert") + +# Prompt the user to select a commit type +echo "Select a commit type:" +select type in "${TYPES[@]}"; do + break +done + +# Extract the commit type and emoji from the selection +type_emoji=${type} +type=${type_emoji#* } +emoji=${type_emoji% *} + +# Prompt the user to enter a scope (optional) +read -p "Enter a scope (optional): " scope + +# Prompt the user to enter a short description +read -p "Enter a short description: " desc + +# Prompt the user to enter a longer description (optional) +read -p "Enter a longer description (optional): " long_desc + +# Create the commit message +commit_msg="$emoji $type($scope): $desc" + +# If a longer description was provided, add it to the commit message +if [ -n "$long_desc" ]; then + commit_msg+=" + +$long_desc" +fi + +# Print the commit message to the console +echo "Commit message:" +echo "$commit_msg" + +# Pull form Github +git pull + +# Stage all changes +git add . + +# Commit the changes with the conventional commit message +git commit -m "$commit_msg" + +# Push the changes to the remote repository +git push origin $(git rev-parse --abbrev-ref HEAD) \ No newline at end of file From 2b76166e15620d983f7399c288abd5967de0fc8d Mon Sep 17 00:00:00 2001 From: Eshan Roy Date: Tue, 26 Nov 2024 16:07:16 +0530 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9E=20fix(error):=20md=20not=20wor?= =?UTF-8?q?king?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profile/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile/README.md b/profile/README.md index 8c81222..7ea4acc 100644 --- a/profile/README.md +++ b/profile/README.md @@ -2,11 +2,11 @@

-# SnigdhaOS +
-![SnigdhaOS](https://raw.githubusercontent.com/snigdhaos/branding/main/logo.png) + An Arch-based Linux distribution focused on performance, simplicity, and user empowerment.