I want to define the version in the root mix.exs. The project in apps can read this version. Can it be configured like this?
root mix.exs
:
defmodule MyCoolUmbrellaApp.Mixfile do
use Mix.Project
def project do
[app: :my_cool_umbrella_app,
version: "1.0",
apps_path: "apps",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
defp deps do
[
]
end
end
code in one of the apps in the umbrella:
defmodule SomeApp.SomeModule do
def some_function() do
project = Mix.Project.get.project
app = project[:app]
version = project[:version]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.