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.
- develop@pleroma/pleroma
variables:
MIX_ENV: dev
+ PLEROMA_BUILD_ENV: prod
script:
- mix deps.get
- mix compile
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)