hvsp: do not send version for series=1
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 2 May 2023 14:47:32 +0000 (10:47 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 1 Jun 2023 19:16:14 +0000 (15:16 -0400)
scripts/kernel-send-patches.sh

index 9aae586..10d93ef 100755 (executable)
@@ -262,7 +262,9 @@ if [ x"${cover}" = x"yes" ]; then
     GIT_FORMAT_PATCH_OPTS="${GIT_FORMAT_PATCH_OPTS} --cover-letter"
 fi
 
-if [ x"${series}" != x"" ]; then
+series_prefix=""
+if [ x"${series}" != x"" -a x"${series}" != x"1" ]; then
+    series_prefix="v${series}-"
     GIT_FORMAT_PATCH_OPTS="${GIT_FORMAT_PATCH_OPTS} -v ${series}"
 fi
 
@@ -270,10 +272,10 @@ git format-patch ${GIT_FORMAT_PATCH_OPTS} --output-directory=${srcdir} ${base_br
 
 if [ x"${cover}" = x"yes" ]; then
     # Replace subject line in cover letter:
-    sed -i -e "s/\*\*\* SUB.*/${subject}/" ${srcdir}/v${series}-0000-cover-letter.patch
+    sed -i -e "s/\*\*\* SUB.*/${subject}/" ${srcdir}/${series_prefix}0000-cover-letter.patch
 
     # Replace blurb line in cover letter:
-    sed -i -e "/.*BLURB.*/{r /tmp/cover-letter.txt" -e 'd}' ${srcdir}/v${series}-0000-cover-letter.patch
+    sed -i -e "/.*BLURB.*/{r /tmp/cover-letter.txt" -e 'd}' ${srcdir}/${series_prefix}0000-cover-letter.patch
 
     collect_email_addresses
 fi
@@ -282,7 +284,7 @@ add_cc_list_addresses
 
 # Check patches (except special case of cover letter patch):
 for p in ${srcdir}/*.patch; do
-    if [ x"$(basename ${p})" != x"v${series}-0000-cover-letter.patch" ]; then
+    if [ x"$(basename ${p})" != x"${series_prefix}0000-cover-letter.patch" ]; then
         if [ x"${ignore_checkpatch_errors}" != x"" ]; then
             set +e
             CHECKPATCH_OPS="--ignore ${ignore_checkpatch_errors}"