How to get vsn from .app file

Hi, I want to get vsn from build folder after compiling, so I do not add a dep and get from Application module.

For example: (_build/dev/lib/castore/ebin/

              {description,"Up-to-date CA certificate store."},

What is the best way to get {vsn,"0.1.17"} from top file as a Tuple?

Thank you in advance

1 Like

If you can load it, then Application.load(:castore) and then Application.spec(:castore, :vsn). Otherwise you will have to parse it, which is what we do here: elixir/compile.all.ex at main · elixir-lang/elixir · GitHub


I want to thank you and also mention this point; When the creator of elixir answers a question, the feeling of happiness that follows is indescribable.
Thank you for all your efforts.