Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/tobybatch/Shell-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybatch committed Jul 21, 2016
2 parents e2bdae5 + 3047535 commit 9898775
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions branches
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ Optional a new named branch can be created and checkout out/pulled.
EOF
}

while getopts "b:lpfa" options; do
while getopts "b:lpfh" options; do
case $options in
b) newbranch="$OPTARG";;
l) latesttag=1;;
p) plainoutput=1;;
f) fetchorigin=1;;
a) autotag=1;;
h) usage; exit;;
esac
done
Expand Down Expand Up @@ -68,6 +67,7 @@ for var in "$ROOTPATH"; do
for x in `find $var/* -name .git | grep -v vendor`; do
dir=`dirname $x`
name=`basename $dir`
clean_dir=${dir#$ROOTPATH/}
if [ "$name" == "tabs-api-client" ] || [ "$name" == "contrib" ]; then
continue
fi
Expand All @@ -81,19 +81,12 @@ for var in "$ROOTPATH"; do
lt=`$GITCMD describe --abbrev=0 --tags 2> /dev/null`
diff=`$GITCMD diff refs/heads/${branch}..refs/tags/${lt} 2> /dev/null`
if [ ! -z "$diff" ]; then
printf "$COL_MAGENTA%-25s$COL_RESET %-20s $COL_RED%-10s$COL_RESET %s\n" $name $branch $lt $dir
if [ "$name" != "tabs-api-client" ] && [ "$name" != "phpcs" ]; then
if [ ! -z "$autotag" ]; then
drupal-tag -y -b patch $dir
else
EXITSTATE=$(($EXITSTATE + 1))
fi
fi
printf "$COL_MAGENTA%-25s$COL_RESET %-20s $COL_RED%-10s$COL_RESET %s\n" $name $branch $lt $clean_dir
else
printf "$COL_CYAN%-25s$COL_RESET %-20s %-10s %s\n" $name $branch $lt $dir
printf "$COL_CYAN%-25s$COL_RESET %-20s %-10s %s\n" $name $branch $lt $clean_dir
fi
else
printf "\n%-25s %-20s %s\n" $name $branch $dir
printf "%-25s %-20s %s\n" $name $branch $clean_dir
fi
if [ ! -z "$newbranch" ]; then
# The --git-dir doesn't work in this case
Expand Down

0 comments on commit 9898775

Please sign in to comment.