osmith submitted this change.
testenv: Dockerfile: rebar3 version via apt-cache
When building for Debian Unstable, we need a higher rebar3 version so it
is compatible with the Erlang OTP version in the distribution. Get the
version of rebar3 from the distribution via apt-cache and download it
instead of hardcoding a version number.
Related: OS#7025#note-10
Change-Id: Ie3c8812c41648dd5ca655114dec00ae7d48eaba8
---
M _testenv/data/podman/Dockerfile
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/_testenv/data/podman/Dockerfile b/_testenv/data/podman/Dockerfile
index a1473df..cc0a9f6 100644
--- a/_testenv/data/podman/Dockerfile
+++ b/_testenv/data/podman/Dockerfile
@@ -119,11 +119,12 @@
&& \
apt-get clean
-# Install rebar3 as described in https://rebar3.org/docs/getting-started/
-# instead of using the Debian package, as the latter pulls in ~600 MB of GUI
-# dependencies that we don't need:
-# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096
-RUN wget https://github.com/erlang/rebar3/releases/download/3.24.0/rebar3 -O /usr/bin/rebar3 && \
+# Install rebar3 from the official release binary instead of using the Debian
+# package, as the latter pulls in ~600 MB of GUI dependencies that we don't
+# need: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096
+RUN set -x && \
+ export REBAR3_VERSION=$(apt-cache madison rebar3 | awk '{print $3}' | cut -d- -f 1) && \
+ wget https://github.com/erlang/rebar3/releases/download/$REBAR3_VERSION/rebar3 -O /usr/bin/rebar3 && \
chmod +x /usr/bin/rebar3 && \
rebar3 --version
To view, visit change 43083. To unsubscribe, or for help writing mail filters, visit settings.