forked from AkkomaGang/akkoma
Merge branch 'fix-otp-version-file-in-docker' into 'develop'
Create OTP_VERSION file by `mix release` See merge request pleroma/pleroma!2362
This commit is contained in:
commit
c433ed9dbb
2 changed files with 10 additions and 3 deletions
|
@ -12,8 +12,6 @@ RUN apk add git gcc g++ musl-dev make &&\
|
||||||
mkdir release &&\
|
mkdir release &&\
|
||||||
mix release --path release
|
mix release --path release
|
||||||
|
|
||||||
RUN echo "${OTP_VERSION}" > release/OTP_VERSION
|
|
||||||
|
|
||||||
FROM alpine:3.11
|
FROM alpine:3.11
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|
11
mix.exs
11
mix.exs
|
@ -37,12 +37,21 @@ def project do
|
||||||
pleroma: [
|
pleroma: [
|
||||||
include_executables_for: [:unix],
|
include_executables_for: [:unix],
|
||||||
applications: [ex_syslogger: :load, syslog: :load],
|
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
|
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
|
def copy_files(%{path: target_path} = release) do
|
||||||
File.cp_r!("./rel/files", target_path)
|
File.cp_r!("./rel/files", target_path)
|
||||||
release
|
release
|
||||||
|
|
Loading…
Reference in a new issue