Skip to content

Commit 26d90e1

Browse files
thrift install script (#939)
* thrift install script
1 parent 606808c commit 26d90e1

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.gitigmore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.dependencies

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This doc is intended for contributors to `cadence-java-client` (hopefully that's
77
## Development Environment
88

99
* Java 11 (currently, we use Java 11 to compile Java 8 code).
10-
* Thrift 0.9.3 (use [homebrew](https://formulae.brew.sh/formula/thrift@0.9) or [distribution](https://downloads.apache.org/thrift/0.9.3/))
10+
* Thrift 0.9.3 (use [homebrew](https://formulae.brew.sh/formula/thrift@0.9) or [distribution](https://downloads.apache.org/thrift/0.9.3/)). Alternatively you can install with `scripts/install-thrift-locally-osx.sh`.
1111
* Gradle build tool [6.x](https://github.com/uber/cadence-java-client/blob/master/gradle/wrapper/gradle-wrapper.properties)
1212
* Docker
1313

scripts/install-thrift-locally-osx.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
if [[ ! -d .dependencies ]]; then
6+
mkdir .dependencies
7+
fi
8+
9+
cd .dependencies
10+
rm -rf thrift
11+
mkdir thrift
12+
cd thrift
13+
14+
APACHE_THRIFT_VERSION=0.9.3
15+
16+
brew install bison
17+
18+
# macs have an old versiion of bison hanging around typically
19+
# so override it by using the brew version in PATH
20+
export PATH="/opt/homebrew/opt/bison/bin:$PATH"
21+
22+
wget https://archive.apache.org/dist/thrift/${APACHE_THRIFT_VERSION}/thrift-${APACHE_THRIFT_VERSION}.tar.gz && \
23+
24+
tar -xvf thrift-${APACHE_THRIFT_VERSION}.tar.gz
25+
rm thrift-${APACHE_THRIFT_VERSION}.tar.gz
26+
cd thrift-${APACHE_THRIFT_VERSION}/
27+
28+
./configure --enable-libs=no --enable-tests=no --enable-tutorial=no --with-cpp=no --with-c_glib=no --with-java=yes --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-python=no && \
29+
30+
make
31+
echo ""
32+
echo "thrift expects to be globally installed :/"
33+
echo "asking do do with sudo to install to /usr/local/bin"
34+
echo ""
35+
sudo make install && \
36+
cd .. && \
37+
rm -rf thrift-${APACHE_THRIFT_VERSION}
38+
thrift --version
39+
echo "done"

0 commit comments

Comments
 (0)