Skip to content

Commit

Permalink
Add a script to call "git checkcommits" on known branches
Browse files Browse the repository at this point in the history
.branches inclues the branches to check
scripts/.known.$BRANCH is the list of exceptions
  • Loading branch information
alikins committed May 10, 2012
1 parent 775eda7 commit f7a552e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .branches
@@ -0,0 +1,2 @@
RHEL5.8
RHEL6.3
5 changes: 5 additions & 0 deletions scripts/.known.RHEL5.8
@@ -0,0 +1,5 @@
da8fe60 Correcting incorrect date in changelog.
1c401af Adding rhel-5.8 releaser
71f8f71 extracted the latest strings and pushed them to zanata
a18205f latest string files

6 changes: 6 additions & 0 deletions scripts/.known.RHEL6.3
@@ -0,0 +1,6 @@
fce5990 819828: Add translated strings for missing translations
3af902e Revert of :"Allow service level change for consumer via CLI independent of other calls."
1dde0af update translations from zanata
8af3faf update strings and pull latest from zanata
fbe983f 811294: refresh strings to fix broken kn.po
85eb7f8 Extracted the latest strings, and sent them to the zanata
39 changes: 39 additions & 0 deletions scripts/checkcommits.sh
@@ -0,0 +1,39 @@
#!/bin/bash

# run git-checkcommits against known branches and look
# for commits that haven't been merged to master
# add a branch name to ".branches" file to have
# it checked by the script
#
# get git-checkcommits from https://github.com/alikins/gitconfig
#
#
if [ -z "${ORIGIN}" ] ; then
ORIGIN="origin"
fi
FAIL=""
BRANCHFILE=".branches"

while read branch;
do
echo "Checking branch: ${branch}"
KNOWNFILE="scripts/.known.${branch}"
if [ -f ${KNOWNFILE} ] ; then
RES=$(git checkcommits master "${ORIGIN}/${branch}" | grep -v -f "${KNOWNFILE}")
else
RES=$(git checkcommits master "${ORIGIN}/${branch}")
fi
if [ -n "${RES}" ] ; then
FAIL="failed"
echo "** WARNING: Unmerged commits from ${branch}"
echo "** If these are known exceptions, add to ${KNOWNFILE}"
echo "${RES}"
echo
fi
done < ${BRANCHFILE}


if [ -n "${FAIL}" ] ; then
exit 1
fi
exit 0

0 comments on commit f7a552e

Please sign in to comment.