Created
April 13, 2020 12:13
-
-
Save yatishbalaji/4b44126e30301ad63bbbe0c05bb65743 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| projDir='~/releases' | |
| declare -A MYMAPS=( | |
| ["partner"]='staging' | |
| ["hire"]='dev' | |
| ["manage"]='staging' | |
| ); | |
| launchCmd=() | |
| for app in "${!MYMAPS[@]}"; do | |
| branch=${MYMAPS[$app]} | |
| cmd='cd '$projDir$app' && git reset --hard;git remote update origin;git checkout '$branch'; git pull origin '$branch';git checkout master; git pull origin master; git rebase '$branch | |
| launchCmd+=(--tab -t "$app=>releaseLive" -e "bash -c '$cmd';bash") | |
| done | |
| gnome-terminal "${launchCmd[@]}"; | |
| exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment