From 5cc754bc7026563a184edff8e2ef4831ff159432 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 18 Feb 2019 16:03:07 -0300 Subject: [PATCH] Adding script to setup version tag. --- pushtag.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+), 0 deletions(-) create mode 100755 pushtag.sh diff --git a/pushtag.sh b/pushtag.sh new file mode 100755 index 0000000..138c135 --- /dev/null +++ b/pushtag.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# https://help.github.com/articles/syncing-a-fork/ +# +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ +# +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html +# +# Setup: +# +# git remote add github https://github.com/PerryWerneck/lib3270.git +# +# + +if [ -z ${1} ]; then + echo "Inform target tag" + exit -1 +fi + +git push + +git fetch origin +git checkout master +git merge origin/master + +git tag -f ${1} + +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') +do + echo "Updating ${repo} ..." + git push ${repo} -f --tags +done + -- libgit2 0.21.2