-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
68 lines (61 loc) · 1.75 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
defmodule AliceNew.MixProject do
use Mix.Project
@alice_version "0.4.3"
@github "https://github.com/alice-bot/alice_new"
def project do
[
app: :alice_new,
start_permanent: Mix.env() == :prod,
version: @alice_version,
elixir: "~> 1.7",
deps: deps(),
package: [
licenses: ["MIT"],
links: %{github: @github},
files: ~w(lib templates .formatter.exs mix.exs README* LICENSE* CHANGELOG*)
],
source_url: @github,
homepage_url: "https://www.alice-bot.org",
docs: [main: "Mix.Tasks.Alice.New.Handler"],
aliases: aliases(),
preferred_cli_env: [
build: :prod,
coveralls: :test,
"coveralls.html": :test,
"coveralls.json": :test
],
test_coverage: [tool: ExCoveralls],
description: """
AliceNew - Mix task to generate a new Alice handler
Provides a `mix alice.new.handler` task to bootstrap a new Alice handler
"""
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:eex]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ex_doc, "~> 0.21", only: [:dev, :docs], runtime: false},
{:excoveralls, "~> 0.12", only: :test},
{:credo, "~> 1.3", only: :dev, runtime: false}
]
end
defp aliases do
[
build: [&build_releases/1]
]
end
defp build_releases(_) do
Mix.Tasks.Compile.run([])
Mix.Tasks.Archive.Build.run([])
Mix.Tasks.Archive.Build.run(["--output=alice_new.ez"])
File.mkdir_p("./archives")
File.rename("alice_new.ez", "./archives/alice_new.ez")
File.rename("alice_new-#{@alice_version}.ez", "./archives/alice_new-#{@alice_version}.ez")
end
end