Commit 5cc754bc7026563a184edff8e2ef4831ff159432
1 parent
4aaba430
Exists in
master
and in
1 other branch
Adding script to setup version tag.
Showing
1 changed file
with
33 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
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 | + | ||
28 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | ||
29 | +do | ||
30 | + echo "Updating ${repo} ..." | ||
31 | + git push ${repo} -f --tags | ||
32 | +done | ||
33 | + |