Merge branch 'ci-improvements' into 'develop'

Add PLEROMA_BUILD_ENV to override env for the version generator and use it in the CI for building docs

See merge request pleroma/pleroma!1360
This commit is contained in:
Haelwenn 2019-07-01 04:51:56 +00:00
commit ce827a1626
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,7 @@ docs-build:
- develop@pleroma/pleroma - develop@pleroma/pleroma
variables: variables:
MIX_ENV: dev MIX_ENV: dev
PLEROMA_BUILD_ENV: prod
script: script:
- mix deps.get - mix deps.get
- mix compile - mix compile

View File

@ -207,6 +207,15 @@ defmodule Pleroma.Mixfile do
env_name = if Mix.env() != :prod, do: to_string(Mix.env()) 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 =
[build_name, env_name] [build_name, env_name]
|> Enum.filter(fn string -> string && string != "" end) |> Enum.filter(fn string -> string && string != "" end)