logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: c433ed9dbb1db9777f235527e06c9c8bec3b1436
parent: fd388a094133bb2dc38039b3b447f9c247dcdbac
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Fri, 10 Apr 2020 03:55:54 +0000

Merge branch 'fix-otp-version-file-in-docker' into 'develop'

Create OTP_VERSION file by `mix release`

See merge request pleroma/pleroma!2362

Diffstat:

MDockerfile2--
Mmix.exs11++++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -12,8 +12,6 @@ RUN apk add git gcc g++ musl-dev make &&\ mkdir release &&\ mix release --path release -RUN echo "${OTP_VERSION}" > release/OTP_VERSION - FROM alpine:3.11 ARG BUILD_DATE diff --git a/mix.exs b/mix.exs @@ -37,12 +37,21 @@ defmodule Pleroma.Mixfile do pleroma: [ include_executables_for: [:unix], applications: [ex_syslogger: :load, syslog: :load], - steps: [:assemble, &copy_files/1, &copy_nginx_config/1] + steps: [:assemble, &put_otp_version/1, &copy_files/1, &copy_nginx_config/1] ] ] ] end + def put_otp_version(%{path: target_path} = release) do + File.write!( + Path.join([target_path, "OTP_VERSION"]), + Pleroma.OTPVersion.version() + ) + + release + end + def copy_files(%{path: target_path} = release) do File.cp_r!("./rel/files", target_path) release