defmodule Bellwether.MixProject do use Mix.Project @version "0.1.0" def project do [ app: :bellwether, version: @version, elixir: "~> 1.15", start_permanent: Mix.env() == :prod, # Tooling for releasing this package lives outside `lib`, so it is # compiled here and never shipped. The rule is simple enough to hold: # everything in `lib` goes to Hex, and nothing else does. elixirc_paths: elixirc_paths(Mix.env()), deps: deps(), description: "Crash reporting for embedded Linux. Captures supervised crashes, " <> "redacts them on the device, and hands them to the Bellwether Agent.", package: package(), docs: docs() ] end def application do [extra_applications: [:logger]] end defp elixirc_paths(:dev), do: ["lib", "dev"] defp elixirc_paths(_), do: ["lib"] defp deps do [ # The only runtime dependency. The Agent is Rust and cannot read ETF, so # the socket speaks the same CBOR the Envelope does. {:cbor, "~> 1.0"}, # Used by `mix bellwether.agent` to supervise the daemon on a device. # Optional because the Adapter itself never starts a process. {:muontrap, "~> 1.0", optional: true}, {:ex_doc, "~> 0.34", only: :dev, runtime: false} ] end defp package do [ licenses: ["Apache-2.0"], # Hex requires a link. Not the repository — it is private, and a source # URL that 404s for everybody who installed this is worse than none. links: %{"Website" => "https://bellwetherdiagnostics.com"}, # `lib` and nothing beside it: `dev/` holds the release tooling, which # needs the Agent source and would only clutter a consumer's `mix help` # with a task they cannot run. # # `priv/bin` carries the Agent for one architecture. A Hex package # cannot hold every target, so aarch64 — what Nerves boards mostly are — # is bundled and the rest are pointed at or built. files: ~w(lib priv mix.exs README.md LICENSE) ] end defp docs do [main: "readme", extras: ["README.md"]] end end