Skip to content

Commit

Permalink
Support for poncho apps
Browse files Browse the repository at this point in the history
  • Loading branch information
m.malkin committed Sep 22, 2023
1 parent 092d867 commit 621ca37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion lib/clean_mixer/compiler_manifests/app.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ defmodule CleanMixer.CompilerManifests.App do
}
end

@spec poncho_project_apps() :: list(t)
def poncho_project_apps do
current_deps()
|> Enum.reject(&String.starts_with?(&1.path, "deps/"))
end

@spec current_deps() :: list(t)
def current_deps() do
def current_deps do
deps = Mix.Dep.load_on_environment(env: Mix.env())

for %{app: app_name, opts: opts} <- deps, !umbrella_app?(opts) do
Expand Down
2 changes: 1 addition & 1 deletion lib/clean_mixer/compiler_manifests/mix_project.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ defmodule CleanMixer.CompilerManifests.MixProject do
end

def apps(%__MODULE__{umbrella?: false}) do
[App.current()]
[App.current()] ++ App.poncho_project_apps()
end
end
8 changes: 4 additions & 4 deletions lib/clean_mixer/project.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ defmodule CleanMixer.Project do
}
end

defp hex_packs() do
for app <- App.current_deps() do
%{name: "hex/#{app.name}", path: app.path, tags: [hex_pack: true]}
end
defp hex_packs do
App.current_deps()
|> Enum.filter(&String.starts_with?(&1.path, "deps/"))
|> Enum.map(fn app -> %{name: "hex/#{app.name}", path: app.path, tags: [hex_pack: true]} end)
end

defp make_arch_map(component_map, code_map) do
Expand Down

0 comments on commit 621ca37

Please sign in to comment.