Current section
Files
Jump to
Current section
Files
mix.exs
defmodule Versioned.MixProject do
use Mix.Project
@source_url "https://github.com/instinctscience/versioned"
@version "0.4.1"
def project do
[
app: :versioned,
name: "Versioned",
version: @version,
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
docs: docs(),
package: package(),
preferred_cli_env: [ci: :test],
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:mix, :ex_unit],
ignore: ".dialyzer_ignore.exs"
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ecto_sql, ">= 3.0.0"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:postgrex, ">= 0.15.0", only: [:test]}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp aliases do
[
ci: ["lint", "test", "dialyzer"],
lint: [
"compile",
"compile --warnings-as-errors",
"format --check-formatted",
"credo"
]
]
end
defp package do
[
description: "Maintain an immutable history for Ecto.Schema records.",
files: ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md),
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/versioned/changelog.html",
"GitHub" => @source_url
}
]
end
def docs do
[
extras: [
"CHANGELOG.md": [],
LICENSE: [title: "License"],
"README.md": [title: "Overview"]
],
main: "readme",
homepage_url: @source_url,
source_url: @source_url,
formatters: ["html"]
]
end
end