On Tue, Jun 18, 2019 at 5:24 PM Ilya Maximets <i.maxim...@samsung.com> wrote:
> On 12.06.2019 12:21, David Marchand wrote: > > Rework the build script so that we can pass branches and tags. > > > > With this, DPDK_VER can be passed as: > > - a string starting with refs/ which is understood as a git reference. > > This triggers a git clone on DPDK_GIT (default value points to > > https://dpdk.org/git/dpdk) for a single branch pointing to this > > reference (to save some disk), > > - else, any other string which is understood as an official release. > > This triggers a tarball download on dpdk.org. > > > > Signed-off-by: David Marchand <david.march...@redhat.com> > > --- > > .travis/linux-build.sh | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh > > index cd8cfcf..ddba2db 100755 > > --- a/.travis/linux-build.sh > > +++ b/.travis/linux-build.sh > > @@ -63,10 +63,13 @@ function install_kernel() > > > > function install_dpdk() > > { > > - if [ -n "$DPDK_GIT" ]; then > > - git clone $DPDK_GIT dpdk-$1 > > - cd dpdk-$1 > > - git checkout tags/v$1 > > + if [ "${1##refs/*/}" != "${1}" ]; then > > + DPDK_GIT=${DPDK_GIT:-https://dpdk.org/git/dpdk} > > + ref="${1##refs/*/}" > > + git clone --single-branch $DPDK_GIT dpdk-git -b $ref > > + name=$(git --git-dir=dpdk-git/.git describe) > > + mv dpdk-git dpdk-$name > > Renaming the directory seems redundant. > Also, as you're moving EXTRA_OPTS update to this function we don't need > standardised folder names anymore. So, you could remove the renaming from > the 'else' branch too. Just 'cd dpdk-git' here and 'cd $DIR_NAME' there. > If you want the exact revision of the branch you're right now for debugging > reasons, you may print it to stdout like 'git log -1 --oneline' and it will > be kept in travis logs. > I usually don't like to scroll back the whole log to find the revision, this is why I had put it in the directory name. But I suppose I should first look at the revision before going to the build errors ;-) Ok, I will remove this, anything else? -- David Marchand _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev