mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 08:12:56 +00:00
Updated -r to be more targeted
This commit is contained in:
parent
87c8aeb8f6
commit
8be9a22995
1 changed files with 17 additions and 23 deletions
|
@ -12,7 +12,7 @@ usage() {
|
|||
echo 'You need to run this from inside a sources git repo' >&2
|
||||
echo '' >&2
|
||||
echo ' -h: This help message' >&2
|
||||
echo ' -r: Use the Redhat tag rather than centos tag' >&2
|
||||
echo ' -r: Use the Redhat commits only' >&2
|
||||
echo ' -c: Return in sha:srpm format' >&2
|
||||
echo ' -q: Suppress warnings' >&2
|
||||
echo '' >&2
|
||||
|
@ -23,6 +23,7 @@ usage() {
|
|||
echo " $0 -b c7" >&2
|
||||
echo " $0 -r -b c7" >&2
|
||||
echo " $0 -c -b remotes/origin/c7" >&2
|
||||
echo " $0 -c -r -b remotes/origin/c7" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -33,19 +34,10 @@ warn () {
|
|||
}
|
||||
|
||||
#####################################################################
|
||||
filter () {
|
||||
# filter used for log messages
|
||||
if [[ ${RHELTAG} -eq 1 ]]
|
||||
then
|
||||
grep -v centos | grep import
|
||||
else
|
||||
grep import
|
||||
fi
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
RHELAUTHOR="CentOS Buildsys <bugs@centos.org>"
|
||||
|
||||
RHELTAG=0
|
||||
RHELONLY=0
|
||||
QUIET=0
|
||||
WITHCOMMITHASH=0
|
||||
BRANCH=""
|
||||
|
@ -66,8 +58,8 @@ while [[ 0 -eq 0 ]]; do
|
|||
break
|
||||
;;
|
||||
-r )
|
||||
# skip any package with 'centos' in the dist area
|
||||
RHELTAG=1
|
||||
# Only look at commits by RHEL
|
||||
RHELONLY=1
|
||||
shift
|
||||
;;
|
||||
-c )
|
||||
|
@ -102,16 +94,18 @@ fi
|
|||
IFS='
|
||||
'
|
||||
|
||||
LOGARGS="--pretty=%H|\%s"
|
||||
if [[ ${RHELONLY} -eq 1 ]]; then
|
||||
LOGARGS="${LOGARGS} --author='${RHELAUTHOR}'"
|
||||
fi
|
||||
|
||||
if [[ "x${BRANCH}" != 'x' ]]; then
|
||||
loglist=$(git log ${BRANCH} --pretty="%H|%s" | filter)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
loglist=$(git log --pretty="%H|%s" | filter)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
LOGARGS="${LOGARGS} ${BRANCH}"
|
||||
fi
|
||||
|
||||
loglist=$(git log ${LOGARGS} |grep import)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# flag for if nothing is found
|
||||
|
|
Loading…
Add table
Reference in a new issue