Skip to content

Commit

Permalink
fix(cherry-pick, build): using TRAVIS_BRANCH to fetch openebs/libcsto…
Browse files Browse the repository at this point in the history
…r branch (#274)

Signed-off-by: mayank <[email protected]>
  • Loading branch information
mynktl authored and vishnuitta committed Jul 26, 2019
1 parent 1143cc9 commit c69a43f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
13 changes: 4 additions & 9 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#!/bin/sh
#!/bin/bash

if [ ! -z ${TRAVIS_TAG} ];
then
ZFS_BUILD_BRANCH=${TRAVIS_TAG}
else
. ./fetch-zfs-branch.sh
fi
source ./fetch-libcstor-branch.sh

echo "Using zfs branch - ${ZFS_BUILD_BRANCH}"
echo $(wget -O /tmp/zrepl_prot.h https://raw.githubusercontent.com/openebs/libcstor/${ZFS_BUILD_BRANCH}/include/zrepl_prot.h)
echo "Using libcstor branch - ${LIBCSTOR_BUILD_BRANCH}"
echo $(wget -O /tmp/zrepl_prot.h https://raw.githubusercontent.com/openebs/libcstor/${LIBCSTOR_BUILD_BRANCH}/include/zrepl_prot.h)

autoreconf -fiv
rm -Rf autom4te.cache
2 changes: 1 addition & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

pwd
make clean
sh autogen.sh
bash autogen.sh
./configure --enable-replication
make clean
make
Expand Down
32 changes: 32 additions & 0 deletions fetch-libcstor-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

#This file is used to specify the LibCStor branch from
# where to fetch the zrepl header files. Depending
# on the release - the header file should be fetched
# from different location.
#
# For example:
# master -> master
# v0.7.x -> v0.7.x
#
# The above 1:1 mapping can't always be guaranteed when
# working in forked repos with branch names like:
# fix-ta123
#
# Now, `fix-ta123` could be a created either from master or
# v0.7.x. This file needs to determine the correct libcstor branch
# by finding the parent of `fix-ta123` and checking if the
# correpsonding branch exists on openebs/libcstor.
#
#For the moment, we will go with making sure the correct
# branch name is provided as part of the release process.
if [ -z ${TRAVIS_BRANCH} ] ||
[ ${TRAVIS_BRANCH} == "replication" ]; then
LIBCSTOR_BUILD_BRANCH="master"
else
LIBCSTOR_BUILD_BRANCH=${TRAVIS_BRANCH}
fi

export LIBCSTOR_BUILD_BRANCH

26 changes: 0 additions & 26 deletions fetch-zfs-branch.sh

This file was deleted.

0 comments on commit c69a43f

Please sign in to comment.