From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com
Subject: Re: [dpdk-dev] [PATCH] devtools: warn about release notes updates
Date: Thu, 20 May 2021 11:47:23 +0200 [thread overview]
Message-ID: <7723733.VEPnZyPds5@thomas> (raw)
In-Reply-To: <20210520075837.30954-1-david.marchand@redhat.com>
20/05/2021 09:58, David Marchand:
> Touching release notes should only be for the current version.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> -VALIDATE_NEW_API=$(dirname $(readlink -f $0))/check-symbol-change.sh
> +ROOTDIR=$(readlink -f $(dirname $(readlink -f $0))/..)
> +VALIDATE_NEW_API=$ROOTDIR/devtools/check-symbol-change.sh
> +FORBIDDEN_TOKENS_SCRIPT=$ROOTDIR/devtools/check-forbidden-tokens.awk
This change is an unrelated cleanup.
Do we keep it in this patch? I'm fine with it, just asking for clarification.
> # Enable codespell by default. This can be overwritten from a config file.
> # Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path
> @@ -58,7 +60,7 @@ check_forbidden_additions() { # <patch>
> -v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \
> -v RET_ON_FAIL=1 \
> -v MESSAGE='Using rte_panic/rte_exit' \
> - -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
> + -f $FORBIDDEN_TOKENS_SCRIPT \
[...]
> +check_release_notes() { # <patch>
> + rel_notes_prefix=doc/guides/rel_notes/release_
> + current_version=$(cat $ROOTDIR/VERSION)
> + major_version=${current_version%%.*}
> + current_version=${current_version##${major_version}.}
> + minor_version=${current_version%%.*}
A simpler version:
cat VERSION | IFS=. read major minor release
> + current_rn=${rel_notes_prefix}${major_version}_${minor_version}.rst
> +
> + ! grep -e '^--- a/'$rel_notes_prefix -e '^+++ b/'$rel_notes_prefix $1 |
Only the +++ part should matters.
> + grep -v $current_rn
> +}
[...]
> + ! $verbose || printf '\nChecking release notes updates:\n'
> + report=$(check_release_notes "$tmpinput")
> + if [ $? -ne 0 ] ; then
> + $headline_printed || print_headline "$3"
> + printf '%s\n' "$report"
> + ret=1
> + fi
Thanks for adding a new check. More is better :)
next prev parent reply other threads:[~2021-05-20 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 7:58 David Marchand
2021-05-20 9:47 ` Thomas Monjalon [this message]
2021-05-20 9:59 ` David Marchand
2021-05-20 10:18 ` Thomas Monjalon
2021-05-20 10:39 ` [dpdk-dev] [PATCH v2] " David Marchand
2021-05-20 21:13 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7723733.VEPnZyPds5@thomas \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).