Skip to content

Commit

Permalink
gh: Update to use latest kerl
Browse files Browse the repository at this point in the history
This also solves the issue that a 27 release candidate was selected
as a backward compat testing release.
  • Loading branch information
garazdawi committed Mar 25, 2024
1 parent 30433dd commit 9563b43
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/dockerfiles/Dockerfile.ubuntu-base
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,19 @@ RUN mkdir /buildroot /tests /otp && chown ${USER}:${GROUP} /buildroot /tests /ot

## We install the latest version of the previous three releases in order to do
## backwards compatability testing of Erlang.
RUN apt-get install -y git curl && \
curl -L https://raw.githubusercontent.com/kerl/kerl/3.1.0/kerl > /usr/bin/kerl && \
RUN apt-get update && apt-get install -y git curl && \
curl -L https://raw.githubusercontent.com/kerl/kerl/master/kerl > /usr/bin/kerl && \
chmod +x /usr/bin/kerl && \
kerl update releases && \
LATEST=$(kerl list releases | tail -1 | awk -F '.' '{print $1}') && \
LATEST=$(kerl list releases | grep "\*$" | tail -1 | awk -F '.' '{print $1}') && \
for release in $(seq $(( LATEST - 2 )) $(( LATEST ))); do \
VSN=$(kerl list releases | grep "^$release" | tail -1); \
VSN=$(kerl list releases | grep "^$release" | tail -1 | awk '{print $1}'); \
if [ $release = $LATEST ]; then \
echo "/usr/local/lib/erlang-${VSN}/bin" > /home/${USER}/LATEST; \
fi && \
echo "Building ${VSN}" && \
kerl build ${VSN} ${VSN} && \
echo "Installing ${VSN} to /usr/local/lib/erlang-${VSN}" && \
kerl install ${VSN} /usr/local/lib/erlang-${VSN}; \
done && \
rm -rf ~/.kerl
Expand Down

0 comments on commit 9563b43

Please sign in to comment.