Skip to content

Instantly share code, notes, and snippets.

@yatishbalaji
Created April 13, 2020 12:13
Show Gist options
  • Select an option

  • Save yatishbalaji/4b44126e30301ad63bbbe0c05bb65743 to your computer and use it in GitHub Desktop.

Select an option

Save yatishbalaji/4b44126e30301ad63bbbe0c05bb65743 to your computer and use it in GitHub Desktop.
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