]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
contrib: push all new stable branches to the galaxy
authorSébastien Han <seb@redhat.com>
Fri, 16 Dec 2016 22:27:33 +0000 (23:27 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 19 Jan 2017 12:42:48 +0000 (13:42 +0100)
Prior to this patch we were only pushing 'master' and 'ansible-1.9'
branches. Each new release also introduces a new branch so we want to
push it as well.

Yes the 'grep' is a bit ugly, feel free to come up with something nicer :)

Signed-off-by: Sébastien Han <seb@redhat.com>
contrib/push-roles-to-ansible-galaxy.sh

index 700e9eaaf774962aa813681264625fdc728f6245..8c4d6dcfdb4372bf08e40922dd1490e2519e96d2 100755 (executable)
@@ -63,7 +63,7 @@ for ROLE in $ROLES; do
   reset_hard_origin
   # First we filter branches by rewriting master with the content of roles/$ROLE
   # this gives us a new commit history
-  for BRANCH in $BRANCHES; do
+  for BRANCH in $(git branch -r | egrep 'origin/master|origin/ansible-1.9|origin/stable-' | grep -v origin/HEAD | cut -d '/' -f2); do
     git checkout -B $BRANCH origin/$BRANCH
     git filter-branch -f --prune-empty --subdirectory-filter roles/$ROLE
     git push -f $REMOTE $BRANCH