summaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-29 14:25:47 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-29 14:28:26 +0300
commitbdc1592377d19da67040a78faf360770c54d4e6a (patch)
tree7ad28cb84b002a515649cc222442ec6c4d556417 /mix.exs
parenta8c9522e04c5d687f8985698de864cccdf3d65e1 (diff)
downloadpleroma-bdc1592377d19da67040a78faf360770c54d4e6a.tar.gz
pleroma-bdc1592377d19da67040a78faf360770c54d4e6a.zip
Add PLEROMA_BUILD_ENV to override env for the version generator and use it in the CI for building docs
This is needed because if we run with MIX_ENV=dev we will get a "+dev" suffix to the version in the docs, but if we run with MIX_ENV=prod the docs build will fail because ex_doc is dev-only dependency.
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/mix.exs b/mix.exs
index 19a80ffb2..c2618d2b2 100644
--- a/mix.exs
+++ b/mix.exs
@@ -207,6 +207,15 @@ defmodule Pleroma.Mixfile do
env_name = if Mix.env() != :prod, do: to_string(Mix.env())
+ env_override = System.get_env("PLEROMA_BUILD_ENV")
+
+ env_name =
+ if env_override do
+ if env_override != "prod", do: env_override
+ else
+ env_name
+ end
+
build =
[build_name, env_name]
|> Enum.filter(fn string -> string && string != "" end)