Skip to content

Commit 3304140

Browse files
author
Jenner Torrence
committed
Add automatic commit and push for setup-generated changes
1 parent ebffa6b commit 3304140

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

setup_dev_env.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,5 +227,27 @@ echo " flutter analyze # Analyze code"
227227
echo " flutter build # Build the application"
228228
echo ""
229229
echo "If you just installed Flutter, you may need to restart your terminal."
230+
echo ""
231+
232+
# 9. Commit and push any changes made during setup
233+
echo "Checking for changes to commit..."
234+
if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then
235+
echo "Changes detected from setup process. Committing and pushing..."
236+
237+
# Add all changes
238+
git add -A
239+
240+
# Commit with descriptive message
241+
git commit -m "Auto-update from setup script: dependencies and generated files" --no-verify
242+
243+
# Push to remote
244+
echo "Pushing changes to remote repository..."
245+
git push origin main
246+
247+
echo "Changes committed and pushed successfully!"
248+
else
249+
echo "No changes to commit."
250+
fi
251+
230252
echo ""
231253
echo "Setup process complete!"

0 commit comments

Comments
 (0)