92 lines
2.8 KiB
Elixir
Raw Normal View History

defmodule OpentelemetryProcessPropagator.MixProject do
use Mix.Project
def project do
{app, desc} = load_app()
config = load_config()
[
app: app,
2022-03-25 14:53:37 -06:00
version: to_string(Keyword.fetch!(desc, :vsn)),
description: to_string(Keyword.fetch!(desc, :description)),
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps(Keyword.fetch!(config, :deps)),
name: "Opentelemetry Process Propagator",
source_url:
"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/propagators/opentelemetry_process_propagator",
docs: [
markdown_processor: ExDoc.Markdown.Earmark,
2022-03-25 14:53:37 -06:00
main: "OpentelemetryProcessPropagator",
# logo: "path/to/logo.png",
# erlang_docs()
extras: []
],
aliases: [
# when build docs first build edocs with rebar3
docs: ["cmd rebar3 edoc", "docs"]
],
plt_file: {:no_warn, "priv/plts/opentelemetry_process_propagator.plt"},
package: package()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp deps(rebar) do
rebar
|> Enum.map(fn
{dep, version} -> {dep, to_string(version)}
dep when is_atom(dep) -> {dep, ">= 0.0.0"}
end)
|> Enum.concat([
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.29", only: :dev, runtime: false},
{:opentelemetry, "~> 1.0", only: [:dev, :test]},
{:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}
])
end
defp package() do
[
description: "Tools for opentelemetry context propagation across process boundaries",
build_tools: ["rebar3", "mix"],
2022-03-25 14:53:37 -06:00
files: ~w(lib mix.exs README.md LICENSE rebar.config rebar.lock src),
licenses: ["Apache-2.0"],
links: %{
"GitHub" =>
"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/propagators/opentelemetry_process_propagator",
"OpenTelemetry Erlang" => "https://github.com/open-telemetry/opentelemetry-erlang",
"OpenTelemetry Erlang Contrib" => "https://github.com/open-telemetry/opentelemetry-erlang-contrib",
"OpenTelemetry.io" => "https://opentelemetry.io"
}
]
end
def erlang_docs() do
files =
for file <- Path.wildcard("edoc/*.md"),
file != "edoc/README.md",
do: {String.to_atom(file), [title: Path.basename(file, ".md")]}
[{:"README.md", [title: "Overview"]} | files]
end
defp load_config do
Improve test matrix and add support for Elixir 1.15 and OTP 26 (#188) * Use test matrix from file * Only check formatting on specific Elixir version * Use latest patch version of each Elixir/OTP release in test matrix * Test on Elixir 1.15 and OTP 26 * Run formatter on opentelemetry_httpoison * Run formatter on opentelemetry_phoenix * Run formatter on opentelemetry_tesla * Fix building opentelemetry_ecto on Elixir 1.15 Upgraded deps to fix ssl_verify_fun not compiling * Fix building opentelemetry_dataloader on Elixir 1.15 Upgraded deps to fix ssl_verify_fun and ecto_sql not compiling * Upgrade opentelemetry_finch to build on Elixir 1.15 * Upgrade opentelemetry_httpoison deps to build on 1.15 * Upgrade opentelemetry_nebulex to build on Elixir 1.15 * Upgrade opentelemetry_oban to build on Elixir 1.15 * Upgrade opentelemetry_phoenix deps to build on 1.15 * Upgrade opentelemetry_redix deps to build on 1.15 * Fix warning about <> being ambiguous * Fix assertion on attributes keys These are always atoms, not strings. * Upgrade ssl_verify_fun in opentelemetry_telemetry * Deterministically sort keys before asserting in tests * Upgrade opentelemetry_process_propogator to build on Elixir 1.15 * Run mix format on opentelemetry_process_propogator * Assert keys are atoms, not strings * Use matrix.os to define runs-on parameter * Pin test matrix to specific OTP + Elixir versions * Run formatter on telemetry and process_propagator * Run formatter over opentelemetry_phoenix --------- Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-08-25 21:11:23 +01:00
{:ok, config} = :file.consult(~c"rebar.config")
config
end
defp load_app do
Improve test matrix and add support for Elixir 1.15 and OTP 26 (#188) * Use test matrix from file * Only check formatting on specific Elixir version * Use latest patch version of each Elixir/OTP release in test matrix * Test on Elixir 1.15 and OTP 26 * Run formatter on opentelemetry_httpoison * Run formatter on opentelemetry_phoenix * Run formatter on opentelemetry_tesla * Fix building opentelemetry_ecto on Elixir 1.15 Upgraded deps to fix ssl_verify_fun not compiling * Fix building opentelemetry_dataloader on Elixir 1.15 Upgraded deps to fix ssl_verify_fun and ecto_sql not compiling * Upgrade opentelemetry_finch to build on Elixir 1.15 * Upgrade opentelemetry_httpoison deps to build on 1.15 * Upgrade opentelemetry_nebulex to build on Elixir 1.15 * Upgrade opentelemetry_oban to build on Elixir 1.15 * Upgrade opentelemetry_phoenix deps to build on 1.15 * Upgrade opentelemetry_redix deps to build on 1.15 * Fix warning about <> being ambiguous * Fix assertion on attributes keys These are always atoms, not strings. * Upgrade ssl_verify_fun in opentelemetry_telemetry * Deterministically sort keys before asserting in tests * Upgrade opentelemetry_process_propogator to build on Elixir 1.15 * Run mix format on opentelemetry_process_propogator * Assert keys are atoms, not strings * Use matrix.os to define runs-on parameter * Pin test matrix to specific OTP + Elixir versions * Run formatter on telemetry and process_propagator * Run formatter over opentelemetry_phoenix --------- Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-08-25 21:11:23 +01:00
{:ok, [{:application, name, desc}]} = :file.consult(~c"src/opentelemetry_process_propagator.app.src")
{name, desc}
end
end