diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-07-24 11:38:23 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-07-24 11:38:23 +0300 |
commit | d0cf1686b2e0bba5748dec066ebd0b5d1148cc72 (patch) | |
tree | df4bf7781e850ab2825e5c2eb24808882b027cc2 /scripts | |
parent | 40f284b370399723479646262a6ebe6b48f79aff (diff) | |
download | vaadin-framework-d0cf1686b2e0bba5748dec066ebd0b5d1148cc72.tar.gz vaadin-framework-d0cf1686b2e0bba5748dec066ebd0b5d1148cc72.zip |
Add script for automatically checking for unmerged commits
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/merge-check.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/merge-check.sh b/scripts/merge-check.sh new file mode 100755 index 0000000000..0debea8b40 --- /dev/null +++ b/scripts/merge-check.sh @@ -0,0 +1,24 @@ +#!/bin/bash +SINCE=$1 +UNTIL=$2 + +if [ "$SINCE" = "" ] || [ "$UNTIL" = "" ] +then + echo "Usage: $0 <since> <until>" + exit 3 +fi + +command="git --no-pager log --no-color $SINCE..$UNTIL" +# TODO Why do I get whitespace in the beginning of the wc output? +change_count=`$command --oneline|wc -l|tr -d ' '` + +if [ "$change_count" = "0" ] +then + echo "No unmerged commits" + exit 0 +fi + +echo "There are $change_count commits that have not been merged from $UNTIL to $SINCE: " +echo "" +$command +exit 1
\ No newline at end of file |