diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-04-10 03:55:54 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-04-10 03:55:54 +0000 |
commit | c433ed9dbb1db9777f235527e06c9c8bec3b1436 (patch) | |
tree | f3fad95172ae161f92386528573f5a1e8a9f11b5 | |
parent | fd388a094133bb2dc38039b3b447f9c247dcdbac (diff) | |
parent | c2aad36aa86694d4131adb2ed47441beca2ab2e8 (diff) | |
download | pleroma-c433ed9dbb1db9777f235527e06c9c8bec3b1436.tar.gz |
Merge branch 'fix-otp-version-file-in-docker' into 'develop'
Create OTP_VERSION file by `mix release`
See merge request pleroma/pleroma!2362
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | mix.exs | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile index c2f3ad98c..29931a5e3 100644 --- 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 @@ -37,12 +37,21 @@ defmodule Pleroma.Mixfile do pleroma: [ include_executables_for: [:unix], applications: [ex_syslogger: :load, syslog: :load], - steps: [:assemble, ©_files/1, ©_nginx_config/1] + steps: [:assemble, &put_otp_version/1, ©_files/1, ©_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 |