Skip to content

Instantly share code, notes, and snippets.

@blaggacao
Created August 12, 2018 17:20
Show Gist options
  • Save blaggacao/51e1386a171cfe8e7114998d03b06610 to your computer and use it in GitHub Desktop.
Save blaggacao/51e1386a171cfe8e7114998d03b06610 to your computer and use it in GitHub Desktop.
Update dev remote
#!/bin/bash
folders=("vendor/odoo/cc/.git" "vendor/odoo/ee/.git")
branches=("master" "11.0")
owndev="dev"
for folder in "${folders[@]}"; do
echo -e "\n\nFetching ${folder}\n"
gitcmd="git --git-dir ${folder}"
eval "${gitcmd} fetch"
for branch in "${branches[@]}"; do
echo -e "\n\nUpdating ${branch}\n"
eval "${gitcmd} checkout ${branch}"
eval "${gitcmd} merge"
echo -e "\nPushing ${branch} to ${owndev}"
eval "${gitcmd} push ${owndev}"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment