mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 06:36:16 +00:00
Create OTP_VERSION file by mix release
This commit is contained in:
parent
d37a102933
commit
0e8f6d24b8
|
@ -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
|
||||
|
|
11
mix.exs
11
mix.exs
|
@ -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_files/1, ©_files/1, ©_nginx_config/1]
|
||||
]
|
||||
]
|
||||
]
|
||||
end
|
||||
|
||||
def put_files(%{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
|
||||
|
|
Loading…
Reference in a new issue