fix parser version check
This commit is contained in:
parent
da9d89a3a0
commit
75805ffc12
1 changed files with 4 additions and 3 deletions
|
|
@ -23,9 +23,10 @@ RUN mix local.hex --force && mix local.rebar --force
|
||||||
# Set build environment
|
# Set build environment
|
||||||
ENV MIX_ENV="prod"
|
ENV MIX_ENV="prod"
|
||||||
|
|
||||||
# Capture APRS parser git hash from GitHub API
|
# Capture APRS parser git hash from GitHub API and set as ENV
|
||||||
RUN curl -s https://api.github.com/repos/aprsme/aprs/commits/main | grep -o '"sha":"[^"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7 > /tmp/parser_hash.txt
|
RUN PARSER_GIT_HASH=$(curl -s https://api.github.com/repos/aprsme/aprs/commits/main | grep -o '"sha":"[^\"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7) && \
|
||||||
ENV PARSER_GIT_HASH=$(cat /tmp/parser_hash.txt)
|
echo "PARSER_GIT_HASH=$PARSER_GIT_HASH" > parser_git_hash.env
|
||||||
|
ENV $(cat parser_git_hash.env | xargs)
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
COPY mix.exs mix.lock ./
|
COPY mix.exs mix.lock ./
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue