I create umbrella project which has tow applications. Each Application has escript.
I tried to install by executing mix escript.install git https://github.com/xxxxx/cleaner.git
.
But I cannnot installed.
mix escript.install git https://github.com/def-elixir/cleaner.git
* Getting new package (https://github.com/def-elixir/xxx.git)
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 38 (delta 7), reused 38 (delta 7), pack-reused 0
origin/HEAD set to develop
==> directory_cleaner
Compiling 1 file (.ex)
Generated directory_cleaner app
==> file_cleaner
Compiling 1 file (.ex)
Generated file_cleaner app
==> directory_cleaner
Generated escript directory_cleaner with MIX_ENV=prod
==> file_cleaner
Generated escript directory_cleaner with MIX_ENV=prod
==> new package
Are you sure you want to install "new package"? [Yn]
** (Mix) Expected "new package" to be a local file path
Usually it installed locally if correct as bellow
All dependencies are up to date
Compiling 1 file (.ex)
Generated test app
Generated escript hello with MIX_ENV=prod
Are you sure you want to install "hello"? [Yn] Y
* creating /Users/def_elixir/.mix/escripts/xxxx
Something wrong ?
./root
├── apps
│ ├── application A
│ │ ├── lib
│ │ └── test
│ └── application B
│ ├── lib
│ └── test
Root (mix.iex)
defmodule Cleaner.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies listed here are available only for this
# project and cannot be accessed from applications inside
# the apps folder.
#
# Run "mix help deps" for examples and options.
defp deps do
[
{:credo, "~> 1.7.5", only: [:dev, :test], runtime: false}
]
end
end
Application A (mix.iex)
defmodule DirectoryCleaner.MixProject do
use Mix.Project
def project do
[
app: :directory_cleaner,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: DirectoryCleaner.CLI, name: "cleanup_all"],
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
# {:sibling_app_in_umbrella, in_umbrella: true}
]
end
end
Application B (mix.iex)
defmodule FileCleaner.MixProject do
use Mix.Project
def project do
[
app: :file_cleaner,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: [main_module: FileCleaner.CLI, name: "cleanup"],
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
# {:sibling_app_in_umbrella, in_umbrella: true}
]
end
end