Przeglądaj źródła

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.
tags/v1.1.4
rinpatch 5 lat temu
rodzic
commit
bdc1592377
2 zmienionych plików z 10 dodań i 0 usunięć
  1. +1
    -0
      .gitlab-ci.yml
  2. +9
    -0
      mix.exs

+ 1
- 0
.gitlab-ci.yml Wyświetl plik

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


+ 9
- 0
mix.exs Wyświetl plik

@@ -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)


Ładowanie…
Anuluj
Zapisz