Skip to content

Commit

Permalink
refactor(bash auto push)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeddnyx committed Jun 14, 2024
1 parent c24fbb6 commit baad91d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions git_auto
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
# Exit immediately if a command exits with a non-zero status
set -e

# Check if commit message and branch are provided as arguments
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 \"commit message\" branch"
echo "Usage: $0 \"commit_message\" branch_name"
exit 1
fi

commit_message="$1"
branch="$2"

echo "Building the Next.js app..."
#npm run build
npm run build

git add .
git commit -m "$commit_message"
Expand Down

0 comments on commit baad91d

Please sign in to comment.