Is this in any way possible? I’m looking for the least hacky solution possible.
Project runs standalone (for hacking/testing) or as a dependency where you would get a shell on the running server and execute a processing run.
It’s open-source but I’d rather not get bogged down in the rationalle - is this possible?
I did have a snippet Keyword.get(Mix.Project.config(), :app)
but it’s not working when placed in the mix.exs file
case Keyword.get(Mix.Project.config(), :app) do
:ex_bench -> dependent_application()
_ -> application(Mix.env())
end
I mean, in fairness, it does say in the mix documentation :
Do not use
Mix.Project.config/0
to find the runtime configuration. Use it only to configure aspects of your project (like compilation directories) and not your application runtime.
I don’t want to find the runtime configuration though, I just want to find out if the project is being compiled and run as a dependency or compiled and run as a standalone project and start the appropriate applications for each environment.