Skip to content

Commit

Permalink
Prevent bootstrap of ZK from clearing previous dist binaries (#12236)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Saponara <[email protected]>
  • Loading branch information
adsr authored Mar 7, 2023
1 parent 0dd2c8b commit 97b151e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,14 @@ install_zookeeper() {
local version="$1"
local dist="$2"
zk="zookeeper-$version"
vtzk="vt-zookeeper-$version"
# This is how we'd download directly from source:
# wget "https://dlcdn.apache.org/zookeeper/$zk/apache-$zk.tar.gz"
$VTROOT/tools/wget-retry "${VITESS_RESOURCES_DOWNLOAD_URL}/apache-${zk}.tar.gz"
tar -xzf "$dist/apache-$zk.tar.gz"
mv $dist/apache-$zk $dist/$vtzk
mvn -f $dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
mkdir -p $dist/$vtzk/lib
cp "$dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/$vtzk/lib/$zk-fatjar.jar"
rm -rf "$zk.tar.gz"
mvn -f $dist/apache-$zk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
mkdir -p $dist/lib
cp "$dist/apache-$zk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/lib/$zk-fatjar.jar"
rm -rf "$dist/apache-$zk"
}


Expand Down Expand Up @@ -270,7 +268,7 @@ install_all() {
# zk
zk_ver=${ZK_VERSION:-3.8.0}
if [ "$BUILD_JAVA" == 1 ] ; then
install_dep "Zookeeper" "$zk_ver" "$VTROOT/dist" install_zookeeper
install_dep "Zookeeper" "$zk_ver" "$VTROOT/dist/vt-zookeeper-$zk_ver" install_zookeeper
fi

# etcd
Expand Down

0 comments on commit 97b151e

Please sign in to comment.