-
Notifications
You must be signed in to change notification settings - Fork 249
Expand file tree
/
Copy pathmix.exs
More file actions
45 lines (38 loc) · 881 Bytes
/
mix.exs
File metadata and controls
45 lines (38 loc) · 881 Bytes
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
defmodule GRPC.GRPCRoot do
use Mix.Project
@version "1.0.0-rc.1"
def project do
[
app: :grpc_root,
version: @version,
deps: deps(),
aliases: aliases()
]
end
defp deps do
[
{:grpc_server, path: "grpc_server"}
]
end
defp aliases do
[
setup: cmd("deps.get"),
compile: cmd("compile"),
test: cmd("test"),
hex_build: cmd("hex.build"),
hex_docs: cmd("hex.docs")
]
end
defp cmd(command) do
ansi = IO.ANSI.enabled?()
base = ["--erl", "-elixir ansi_enabled #{ansi}", "-S", "mix", command]
for app <- ~w(grpc_core grpc_server grpc) do
fn args ->
{_, res} = System.cmd("elixir", base ++ args, into: IO.binstream(:stdio, :line), cd: app)
if res > 0 do
System.at_exit(fn _ -> exit({:shutdown, 1}) end)
end
end
end
end
end