-
Notifications
You must be signed in to change notification settings - Fork 17
/
mix.exs
65 lines (56 loc) · 1.56 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
defmodule Gatling.Mixfile do
use Mix.Project
def version, do: "1.1.1"
def project do
[
app: :gatling,
version: version(),
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
name: "Gatling",
source_url: "https://github.com/hashrocket/gatling",
package: package(),
description: description(),
aliases: aliases(),
deps: deps(),
docs: [
extras: [ "README.md" ]
],
]
end
defp description do
"Enjoy heroku like deployments with Distillery and your own server"
end
defp package do
[
name: :gatling,
licenses: ["Apache 2.0"],
maintainers: ["Micah Cooper", "Hashrocket"],
links: %{
"GitHub" => "https://github.com/hashrocket/gatling",
"Hashrocket" => "https://hashrocket.com",
}
]
end
def application do
[applications: [:logger]]
end
defp deps do
[ {:ex_doc, ">= 0.0.0", only: :dev} ]
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=gatling.ez"])
archives = "./gatling_archives"
File.rename("gatling.ez", "#{archives}/gatling.ez")
File.rename("gatling-#{version()}.ez", "#{archives}/gatling-#{version()}.ez")
archives_readme = File.read!("#{archives}/README.md")
new_readme = Regex.replace(~r/__.+__/, archives_readme, "__#{version()}__")
File.write("#{archives}/README.md", new_readme)
end
end