patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Luca Boccassi <luca.boccassi@gmail.com>
Cc: dpdk stable <stable@dpdk.org>,
	Luca Boccassi <luca.boccassi@microsoft.com>
Subject: Re: [dpdk-stable] [scripts 1/2] 4-final-review: add support for VERSION file
Date: Mon, 22 Feb 2021 16:12:16 +0100
Message-ID: <CAATJJ0+a6kpb+h-LM6759NYKyQXoHr4CWXVRGGo8=+LjNGqGug@mail.gmail.com> (raw)
In-Reply-To: <20210222150115.278569-1-luca.boccassi@gmail.com>

On Mon, Feb 22, 2021 at 4:01 PM <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <luca.boccassi@microsoft.com>
>
> This script was still expecting to find the version
> in the rte_version.h header, but it's now a single file
> in the root of the repo
> ---
>  4-final-review | 28 +++++++++++++++++++++++-----
>  1 file changed, 23 insertions(+), 5 deletions(-)


Acked-by: Christian Ehrhardt <christian.erhrhardt@canonical.com>

>
> diff --git a/4-final-review b/4-final-review
> index c4fedb7..0444b1e 100755
> --- a/4-final-review
> +++ b/4-final-review
> @@ -4,8 +4,26 @@ source ./lib.sh
>
>  assert_current_branch
>
> -RTE_VER_RELEASE=$(awk '/#define RTE_VER_RELEASE/ { print $3 }' \
> -       $DPDK_DIR/lib/librte_eal/common/include/rte_version.h)
> +if [ -r "$DPDK_DIR/lib/librte_eal/include/rte_version.h" ]; then
> +       VERSION_HEADER="$DPDK_DIR/lib/librte_eal/include/rte_version.h"
> +elif [ -r "$DPDK_DIR/lib/librte_eal/common/include/rte_version.h" ]; then
> +       VERSION_HEADER="$DPDK_DIR/lib/librte_eal/common/include/rte_version.h"
> +else
> +       echo "Cannot find rte_version.h"
> +       exit 1
> +fi
> +
> +if [ -e "$DPDK_DIR/VERSION" ]; then
> +       if grep -q -F "rc" "$DPDK_DIR/VERSION"; then
> +               RTE_VER_RELEASE=$(sed -E "s/.*rc(.*)/\1/" "$DPDK_DIR/VERSION")
> +       else
> +               RTE_VER_RELEASE=16
> +       fi
> +else
> +       RTE_VER_RELEASE=$(awk '/#define RTE_VER_RELEASE/ { print $3 }' \
> +               ${VERSION_HEADER})
> +fi
> +
>  [ $RTE_VER_RELEASE -eq 16 ] && {
>         RTE_VER_RELEASE=1
>  } || {
> @@ -17,11 +35,11 @@ stable_release_rc="${stable_release}-rc${RTE_VER_RELEASE}"
>  change_version()
>  {
>         sed "s/#define RTE_VER_MINOR [0-9]*/#define RTE_VER_MINOR ${RTE_VER_MINOR}/" \
> -               -i $DPDK_DIR/lib/librte_eal/common/include/rte_version.h
> +               -i ${VERSION_HEADER}
>         sed 's/#define RTE_VER_SUFFIX .*/#define RTE_VER_SUFFIX "-rc"/' \
> -               -i $DPDK_DIR/lib/librte_eal/common/include/rte_version.h
> +               -i ${VERSION_HEADER}
>         sed "s/#define RTE_VER_RELEASE .*/#define RTE_VER_RELEASE ${RTE_VER_RELEASE}/" \
> -               -i $DPDK_DIR/lib/librte_eal/common/include/rte_version.h
> +               -i ${VERSION_HEADER}
>         if [ -e $DPDK_DIR/pkg/dpdk.spec ]; then
>                 sed "s/Version: .*/Version: ${stable_release_rc}/" -i $DPDK_DIR/pkg/dpdk.spec
>         fi
> --
> 2.29.2
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

      parent reply	other threads:[~2021-02-22 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 15:01 luca.boccassi
2021-02-22 15:01 ` [dpdk-stable] [scripts 2/2] 4-final-review: silence git/pushd/popd commands luca.boccassi
2021-02-22 15:13   ` Christian Ehrhardt
2021-02-22 15:12 ` Christian Ehrhardt [this message]

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='CAATJJ0+a6kpb+h-LM6759NYKyQXoHr4CWXVRGGo8=+LjNGqGug@mail.gmail.com' \
    --to=christian.ehrhardt@canonical.com \
    --cc=luca.boccassi@gmail.com \
    --cc=luca.boccassi@microsoft.com \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git