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
root committed Sep 8, 2016
2 parents 320383f + 9898775 commit 781592f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 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
10 changes: 10 additions & 0 deletions colour-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if test -t 1; then
ncolors=$(tput colors)
if test -n "$ncolors" && test $ncolors -ge 8; then
exit 0
else
exit 1
fi
fi
2 changes: 1 addition & 1 deletion drupal-tag
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if [ -z "$NEWBRANCH" ]; then
bumpUp ${MAJOR_VERSION} ${MINOR_VERSION} ${PATCH_VERSION} ${BUMP}
NEW_TAG="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
else
NEW_TAG=$NEWBRANCH
NEW_TAG="$NEWBRANCH"
fi

echo $NEW_TAG > $NEWCHANGELOG
Expand Down

0 comments on commit 781592f

Please sign in to comment.