MODULE="$1"
+# Push to repositories
+function hydra_git_push {
+ if [ "`git remote | wc -l`" == "0" ]; then
+ return
+ elif git remote | grep -q 'all'; then
+ git push all --all
+ elif git remote | grep -q 'origin'; then
+ git push --all
+ fi
+}
+
if [ -d "$HYDRA_FOLDER/modules/$MODULE" ]; then
shift
echo "Commiting changes at $MODULE module..."
- ( cd "$HYDRA_FOLDER/modules/$MODULE" && git commit -a -m "$*" )
+ ( cd "$HYDRA_FOLDER/modules/$MODULE" && git commit -a -m "$*" && hydra_git_push )
echo ""
hydra $HYDRA module-update $MODULE
else