Skip to content

Commit

Permalink
Update mix file for hex packaging
Browse files Browse the repository at this point in the history
[close #113]
  • Loading branch information
cpjolicoeur committed Nov 14, 2024
1 parent c51fe9e commit 1c9705f
Showing 1 changed file with 32 additions and 17 deletions.
49 changes: 32 additions & 17 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
defmodule Scrivener.Ecto.Mixfile do
use Mix.Project

@source_url "https://github.com/mojotech/scrivener_ecto"
@version "3.1.1"

def project do
[
app: :scrivener_ecto,
version: "3.1.0",
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
description: "Paginate your Ecto queries with Scrivener",
source_url: @source_url,
homepage_url: @source_url,
deps: deps(),
aliases: aliases(),
docs: [
main: "readme",
extras: [
"README.md"
]
]
]
end

defp aliases do
[
"db.reset": [
"ecto.drop",
"ecto.create",
"ecto.migrate"
]
docs: docs()
]
end

Expand All @@ -48,9 +38,32 @@ defmodule Scrivener.Ecto.Mixfile do
]
end

defp aliases do
[
"db.reset": [
"ecto.drop",
"ecto.create",
"ecto.migrate"
]
]
end

defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

defp docs do
[
main: "readme",
extras: [
"README.md": [title: "Overview"],
"LICENSE": [title: "License"],
"CHANGELOG.md": [title: "Changelog"]
],
source_ref: "v#{@version}",
formatters: ~w(html)
]
end

defp package do
[
maintainers: ["MojoTech"],
Expand All @@ -59,6 +72,8 @@ defmodule Scrivener.Ecto.Mixfile do
files: [
"lib/scrivener",
"mix.exs",
"CHANGELOG.md",
"LICENSE",
"README.md"
]
]
Expand Down

0 comments on commit 1c9705f

Please sign in to comment.