/ mix.exs
mix.exs
 1  defmodule Echo.MixProject do
 2    use Mix.Project
 3  
 4    def project do
 5      [
 6        apps: [
 7          :echo_shared,
 8          :delegator,
 9          :ceo,
10          :cto,
11          :chro,
12          :operations_head,
13          :product_manager,
14          :senior_architect,
15          :senior_developer,
16          :test_lead,
17          :uiux_engineer,
18          :echo_monitor
19        ],
20        apps_path: "apps",
21        version: "0.1.0",
22        start_permanent: Mix.env() == :prod,
23        deps: deps(),
24        aliases: aliases()
25      ]
26    end
27  
28    # Dependencies listed here are available only for this project
29    # and cannot be accessed from applications inside the apps/ folder.
30    defp deps do
31      []
32    end
33  
34    # Aliases are shortcuts or tasks specific to the current project.
35    # Aliases listed here are available only for this project
36    # and cannot be accessed from applications inside the apps/ folder.
37    defp aliases do
38      agent_apps = [
39        "ceo",
40        "cto",
41        "chro",
42        "operations_head",
43        "product_manager",
44        "senior_architect",
45        "senior_developer",
46        "test_lead",
47        "uiux_engineer"
48      ]
49  
50      [
51        # Run tests in all apps
52        test: ["cmd mix test"],
53        # Compile all apps
54        compile: ["cmd mix compile"],
55        # Build all agent escripts
56        "escript.build": prepare_cmd(agent_apps, "cmd mix escript.build")
57      ]
58    end
59  
60    defp prepare_cmd(apps, command) do
61      "do " <>
62        Enum.map_join(apps, " ", fn app ->
63          "--app #{app} " <> command
64        end)
65    end
66  end