Created
September 24, 2019 19:41
-
-
Save OlegGorj/3c246bdb7a2c35ccc9536ebb43ef1530 to your computer and use it in GitHub Desktop.
commit code changes to GitHub for all storefront projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# commit code changes to GitHub for all storefront projects | |
# usage: sh ./git_helper.sh "Refactoring storefront code" | |
args=("$@") | |
root="/Users/garystafford/Documents/projects" | |
repos=( | |
storefront-demo-accounts | |
storefront-demo-orders | |
storefront-demo-fulfillment | |
storefront-eureka-server | |
storefront-zuul-proxy | |
storefront-kafka-docker | |
) | |
if [ -n "${args[0]}" ]; then | |
comment=${args[0]} | |
else | |
comment="Automated commit of changes to project" | |
fi | |
for repo in "${repos[@]}" | |
do | |
cd ${root}/${repo} && \ | |
git add -A && \ | |
git commit -m "${comment}" && \ | |
git push && \ | |
git status | |
echo ${repo} | |
done | |
cd ../ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment