-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmix.exs
79 lines (72 loc) · 1.9 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
69
70
71
72
73
74
75
76
77
78
79
defmodule Cloak.Mixfile do
use Mix.Project
def project do
[
app: :cloak,
version: _version(),
elixir: "~> 1.11",
build_embedded: false,
start_permanent: Mix.env == :prod,
elixirc_paths: _elixirc_paths(Mix.env),
aliases: _aliases(),
deps: _deps(),
description: "Shadowsocks Server",
releases: [
cloak: [
cookie: "CHANGEME",
include_executables_for: [:unix]
]
]
]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
[
extra_applications: [:crypto, :logger],
mod: {Cloak.Application, []}
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type "mix help deps" for more examples and options
defp _deps do
[
{ :jason, "~> 1.1" },
{ :yaml_elixir, "~> 2.0" },
{ :ranch, "~> 2.0" },
{ :gen_state_machine, "~> 3.0" },
{ :tortoise, "~> 0.9" },
{ :blake3, "~> 0.4.1" },
{ :cachex, "~> 3.0" },
{ :observer_cli, "~> 1.5", only: [:dev] },
{ :dialyxir, "~> 1.0", only: [:dev], runtime: false }
]
end
defp _aliases do
[
release: "release --overwrite",
test: "test --no-start"
]
end
defp _elixirc_paths(:test), do: ["lib", "test/support"]
defp _elixirc_paths(_), do: ["lib", "web"]
defp _version() do
build = case _git_sha() do
"" -> "dummy"
str -> str
end
String.trim( File.read!("VERSION") ) <> "+" <> build
end
defp _git_sha() do
{result, _exit_code} = System.cmd("git", ["rev-parse", "HEAD"])
String.slice(result, 0, 5)
end
end