Skip to content

Apache DataFusion SQL Query Engine

Remove hard coded ballista versions. Fixes #32 (#49)

sathisfa999799b65f
diff --git a/benchmarks/tpch-gen.sh b/benchmarks/tpch-gen.sh
index fef3480c61..3cef3bdfdd 100755
--- a/benchmarks/tpch-gen.sh
+++ b/benchmarks/tpch-gen.sh
@@ -16,10 +16,9 @@
# specific language governing permissions and limitations
# under the License.
-BALLISTA_VERSION=0.5.0-SNAPSHOT
-
#set -e
+. ./dev/build-set-env.sh
docker build -t ballistacompute/ballista-tpchgen:$BALLISTA_VERSION -f tpchgen.dockerfile .
# Generate data into the ./data directory if it does not already exist
diff --git a/dev/build-rust-base.sh b/dev/build-rust-base.sh
index 1bedbd880b..f2a4cc3238 100755
--- a/dev/build-rust-base.sh
+++ b/dev/build-rust-base.sh
@@ -16,6 +16,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-BALLISTA_VERSION=0.5.0-SNAPSHOT
set -e
+
+. ./dev/build-set-env.sh
docker build -t ballistacompute/rust-base:$BALLISTA_VERSION -f dev/docker/rust-base.dockerfile .
diff --git a/dev/build-rust.sh b/dev/build-rust.sh
index 5777d1eb25..479cb2a135 100755
--- a/dev/build-rust.sh
+++ b/dev/build-rust.sh
@@ -17,8 +17,7 @@
# specific language governing permissions and limitations
# under the License.
-BALLISTA_VERSION=0.5.0-SNAPSHOT
-
set -e
+. ./dev/build-set-env.sh
docker build -t ballistacompute/ballista-rust:$BALLISTA_VERSION -f dev/docker/rust.dockerfile .
diff --git a/dev/build-set-env.sh b/dev/build-set-env.sh
new file mode 100755
index 0000000000..3eb29e7ce1
--- /dev/null
+++ b/dev/build-set-env.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+export BALLISTA_VERSION=$(awk -F'[ ="]+' '$1 == "version" { print $2 }' ballista/rust/core/Cargo.toml)
diff --git a/dev/build-ui.sh b/dev/build-ui.sh
index d39d610bd7..bb5bff3d18 100755
--- a/dev/build-ui.sh
+++ b/dev/build-ui.sh
@@ -17,8 +17,7 @@
# specific language governing permissions and limitations
# under the License.
-BALLISTA_VERSION=0.4.2-SNAPSHOT
-
set -e
+. ./dev/build-set-env.sh
docker build -t ballistacompute/ballista-scheduler-ui:$BALLISTA_VERSION -f dev/docker/ui.scheduler.dockerfile ballista/ui/scheduler