From 82428c5589394f9142bea9c4dcaccb3f763ec9cc Mon Sep 17 00:00:00 2001 From: Kristen Hercules Date: Wed, 18 Feb 2026 23:00:58 -0600 Subject: [PATCH] Web Update --- scripts/commit_local.sh | 91 +++++++++++++++++++++++++++++++++++++++++ scripts/quick_commit.sh | 37 +++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100755 scripts/commit_local.sh create mode 100755 scripts/quick_commit.sh diff --git a/scripts/commit_local.sh b/scripts/commit_local.sh new file mode 100755 index 0000000..ac0ca6d --- /dev/null +++ b/scripts/commit_local.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +# Local Git Commit Script +# This script commits changes to the local repository + +echo "====================================" +echo "Local Git Commit Script" +echo "====================================" +echo "" + +# Show current status +echo "Current Git Status:" +git status +echo "" + +# Ask user for commit type +echo "Select what to commit:" +echo "1) All changes (including logs)" +echo "2) Code changes only (exclude logs)" +echo "3) Custom selection" +read -p "Enter your choice (1-3): " choice + +case $choice in + 1) + echo "" + echo "Adding all changes..." + git add . + ;; + 2) + echo "" + echo "Adding code changes (excluding logs)..." + git add frontend/public/favicon*.png + git add frontend/public/android-chrome-*.png + git add frontend/public/apple-touch-icon.png + git add frontend/public/manifest.json + git add frontend/public/favicon.ico + git add frontend/public/index.html + git add frontend/src/components/cards/ProductCard.js + git add frontend/src/pages/About.js + git add frontend/src/pages/Products.js + git add backend/create_favicons.py + git add backend/update_hero_image.py + ;; + 3) + echo "" + echo "Enter the files/folders to add (space-separated):" + read -p "> " files + git add $files + ;; + *) + echo "Invalid choice. Exiting." + exit 1 + ;; +esac + +echo "" +echo "Staged changes:" +git status +echo "" + +# Get commit message from user +read -p "Enter commit message: " commit_message + +if [ -z "$commit_message" ]; then + echo "Error: Commit message cannot be empty." + exit 1 +fi + +# Commit the changes +echo "" +echo "Committing changes..." +git commit -m "$commit_message" + +if [ $? -eq 0 ]; then + echo "" + echo "✓ Changes committed successfully!" + echo "" + echo "Current status:" + git log -1 --oneline + echo "" + git status +else + echo "" + echo "✗ Commit failed!" + exit 1 +fi + +echo "" +echo "====================================" +echo "Commit completed successfully!" +echo "====================================" diff --git a/scripts/quick_commit.sh b/scripts/quick_commit.sh new file mode 100755 index 0000000..d1d0ceb --- /dev/null +++ b/scripts/quick_commit.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Quick Git Commit Script +# Usage: ./quick_commit.sh "Your commit message" + +if [ -z "$1" ]; then + echo "Usage: ./quick_commit.sh \"Your commit message\"" + echo "" + echo "Current changes:" + git status --short + exit 1 +fi + +COMMIT_MSG="$1" + +echo "Adding all changes (excluding logs)..." + +# Add specific files (excluding logs) +git add frontend/public/*.png +git add frontend/public/*.ico +git add frontend/public/manifest.json +git add frontend/public/index.html +git add frontend/src/ +git add backend/*.py + +echo "" +echo "Committing: $COMMIT_MSG" +git commit -m "$COMMIT_MSG" + +if [ $? -eq 0 ]; then + echo "" + echo "✓ Committed successfully!" + git log -1 --oneline +else + echo "" + echo "✗ Commit failed or nothing to commit" +fi