-defmodule Pleroma.Config.Loader do
- # TODO: add support for releases
- if Code.ensure_loaded?(Config.Reader) do
- @spec load() :: map()
- def load do
- config = Config.Reader.read!("config/config.exs")
- env_config = Config.Reader.read!("config/#{Mix.env()}.exs")
-
- Config.Reader.merge(config, env_config)
- end
- else
- # support for Elixir less than 1.9
- @spec load() :: map()
- def load do
- {config, _paths} = Mix.Config.eval!("config/config.exs")
- {env_config, _paths} = Mix.Config.eval!("config/#{Mix.env()}.exs")
-
- Mix.Config.merge(config, env_config)
- end
- end
-end
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only