Reputation: 12085
When compiling an Elixir mix project into an escript, I want to be able to access its mixfile for looking up things like the version number. When I run the project in IEx this is no problem. But it seems that mix is not compiling the mixfile into the escript.
When I try to access the mixfile I get: module MixfileTest.Mixfile is not available
I have tried require
ing the module but this is to no avail. How can I access a project's mixfile once compiled to an escript?
Upvotes: 2
Views: 103
Reputation: 910
You could get the project details at compile time. Just an idea.
defmodule MixfileTest do
@project MixfileTest.Mixfile.project()
def main([]) do
IO.inspect @project
end
end
Upvotes: 3