Skip to content

Commit

Permalink
Merge branch 'lukas/gh/fix-hex-install'
Browse files Browse the repository at this point in the history
* lukas/gh/fix-hex-install:
  gh: Install re-built hex via mix
  • Loading branch information
garazdawi committed Mar 25, 2024
2 parents 726cd2f + 8359270 commit e31d35c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/dockerfiles/Dockerfile.ubuntu-base
Original file line number Diff line number Diff line change
Expand Up @@ -106,30 +106,24 @@ COPY --chown=${USER}:${GROUP} dockerfiles/init.sh /buildroot/

WORKDIR /buildroot/

## Build and install elixir, hex and ex_doc
ENV ELIXIR_VSN=latest \
HEX_VSN=latest \
EX_DOC_VSN=latest
## Build and install elixir and hex
ENV ELIXIR_VSN=latest
RUN export PATH="$(cat /home/${USER}/LATEST):${PATH}" && \
set -x && \
mkdir /buildroot/elixir && cd /buildroot/elixir && \
curl -s https://api.github.com/repos/elixir-lang/elixir/releases/${ELIXIR_VSN} | \
jq '.tarball_url' | xargs curl -L > elixir.tar.gz && \
tar xzf elixir.tar.gz --strip-components=1 && \
make && sudo make install && \
mkdir /buildroot/hex && cd /buildroot/hex && \
curl -s https://api.github.com/repos/hexpm/hex/releases/${HEX_VSN} | \
jq '.tarball_url' | xargs curl -L > hex.tar.gz && \
tar xzf hex.tar.gz --strip-components=1 && \
mix install
mix archive.install github hexpm/hex branch latest --force

## Install test tools rebar3, proper and jsx
RUN export PATH="$(cat /home/${USER}/LATEST):${PATH}" && \
latest () { \
local VSN=$(curl -sL "https://api.github.com/repos/$1/tags" | jq -r ".[] | .name" | grep -E '^v?[0-9]' | sort -V | tail -1); \
curl -sL "https://github.com/$1/archive/$VSN.tar.gz" > $(basename $1).tar.gz; \
} && \
curl -sL "https://github.com/erlang/rebar3/archive/refs/heads/main.tar.gz" > rebar3.tar.gz && ls -la && \
latest erlang/rebar3 && \
(tar xzf rebar3.tar.gz && cd rebar3-* && ./bootstrap && sudo cp rebar3 /usr/bin) && \
latest proper-testing/proper && \
(tar xzf proper.tar.gz && mv proper-* proper && cd proper && make) && \
Expand Down

0 comments on commit e31d35c

Please sign in to comment.