Commit 12f57b04f8163b4c4518ad3396703b03699ea00d
1 parent
da0221bd
Exists in
master
and in
5 other branches
Adding pushtag script.
Showing
1 changed file
with
34 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
| 1 | +#!/bin/bash | ||
| 2 | +# | ||
| 3 | +# https://help.github.com/articles/syncing-a-fork/ | ||
| 4 | +# | ||
| 5 | +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | ||
| 6 | +# | ||
| 7 | +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | ||
| 8 | +# | ||
| 9 | +# Setup: | ||
| 10 | +# | ||
| 11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | ||
| 12 | +# | ||
| 13 | +# | ||
| 14 | + | ||
| 15 | +if [ -z ${1} ]; then | ||
| 16 | + echo "Inform target tag" | ||
| 17 | + exit -1 | ||
| 18 | +fi | ||
| 19 | + | ||
| 20 | +git push | ||
| 21 | + | ||
| 22 | +git fetch origin | ||
| 23 | +git checkout master | ||
| 24 | +git merge origin/master | ||
| 25 | + | ||
| 26 | +git tag -f ${1} | ||
| 27 | +git push -f --tags | ||
| 28 | + | ||
| 29 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | ||
| 30 | +do | ||
| 31 | + echo "Updating ${repo} ..." | ||
| 32 | + git push ${repo} -f --tags | ||
| 33 | +done | ||
| 34 | + |