summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-02-04 16:06:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 09:37:22 +0000
commit52b1b6c98b4771c3fcbd4f970d9effb335b46aff (patch)
treea998e7d38295a8e0c9bed7590f5aed0d14643443 /scripts
parent77b1409522abd9bef511a160ec2f768cdd3c7580 (diff)
downloadpoky-52b1b6c98b4771c3fcbd4f970d9effb335b46aff.tar.gz
send-pull-request: add extra CC argument
* useful e.g. when sending pull-request to release branch with extra CC for release maintainer (From OE-Core rev: 52bc47756eb8a81ea07ef4bc06345ef335b30ceb) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/send-pull-request13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 18a53c410e..575549db38 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -32,6 +32,7 @@ GITSOBCC="--suppress-cc=all"
32unset TO 32unset TO
33unset CC 33unset CC
34unset AUTO_CC 34unset AUTO_CC
35unset EXTRA_CC
35 36
36usage() 37usage()
37{ 38{
@@ -42,6 +43,7 @@ Usage: $(basename $0) [-h] [-a] [-c] [[-t email]...] -p pull-dir
42 This option implies -c. 43 This option implies -c.
43 -c Expand the Cc list for the individual patches using the Cc and 44 -c Expand the Cc list for the individual patches using the Cc and
44 Signed-off-by lines from the same patch. 45 Signed-off-by lines from the same patch.
46 -C Add extra CC to each email sent.
45 -p pull-dir Directory containing summary and patch files 47 -p pull-dir Directory containing summary and patch files
46 -t email Explicitly add email to the recipients 48 -t email Explicitly add email to the recipients
47EOM 49EOM
@@ -68,7 +70,7 @@ harvest_recipients()
68} 70}
69 71
70# Parse and verify arguments 72# Parse and verify arguments
71while getopts "achp:t:" OPT; do 73while getopts "acC:hp:t:" OPT; do
72 case $OPT in 74 case $OPT in
73 a) 75 a)
74 AUTO=1 76 AUTO=1
@@ -79,6 +81,9 @@ while getopts "achp:t:" OPT; do
79 AUTO=1 81 AUTO=1
80 GITSOBCC="--signed-off-by-cc" 82 GITSOBCC="--signed-off-by-cc"
81 ;; 83 ;;
84 C)
85 EXTRA_CC="$OPTARG"
86 ;;
82 h) 87 h)
83 usage 88 usage
84 exit 0 89 exit 0
@@ -149,15 +154,15 @@ fi
149export IFS=$',' 154export IFS=$','
150GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) 155GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
151GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done) 156GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
157GIT_EXTRA_CC=$(for R in $EXTRA_CC; do echo -n "--cc='$R' "; done)
152unset IFS 158unset IFS
153 159
154
155# Handoff to git-send-email. It will perform the send confirmation. 160# Handoff to git-send-email. It will perform the send confirmation.
156PATCHES=$(echo $PDIR/*.patch) 161PATCHES=$(echo $PDIR/*.patch)
157if [ $AUTO_CL -eq 1 ]; then 162if [ $AUTO_CL -eq 1 ]; then
158 # Send the cover letter to every recipient, both specified as well as 163 # Send the cover letter to every recipient, both specified as well as
159 # harvested. Then remove it from the patches list. 164 # harvested. Then remove it from the patches list.
160 eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL" 165 eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL"
161 if [ $? -eq 1 ]; then 166 if [ $? -eq 1 ]; then
162 echo "ERROR: failed to send cover-letter with automatic recipients." 167 echo "ERROR: failed to send cover-letter with automatic recipients."
163 exit 1 168 exit 1
@@ -167,7 +172,7 @@ fi
167 172
168# Send the patch to the specified recipients and, if -c was specified, those git 173# Send the patch to the specified recipients and, if -c was specified, those git
169# finds in this specific patch. 174# finds in this specific patch.
170eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES" 175eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES"
171if [ $? -eq 1 ]; then 176if [ $? -eq 1 ]; then
172 echo "ERROR: failed to send patches." 177 echo "ERROR: failed to send patches."
173 exit 1 178 exit 1