ExVersions
Updates your README.md with version credentials of all your (specified) external dependencies.
Installation
-
Add
ex_versionsto your list of dependencies inmix.exs:
```elixir
def deps do
[{:ex_versions, "~> 0.0.1"}]
end
```-
Ensure
ex_versionsis started before your application:
```elixir
def application do
[applications: [:ex_versions]]
end
```Usage
Within your apps start function, such as in lib/my_app.ex for Phoenix apps, add:
# For each tuple:
## - First argument is the desired title for the dependency.
## - Second argument is the bash command for the version of the dependency.
ExVersions.watch [
{"Elixir", "elixir -v"},
{"Phoenix", "mix phoenix.new -v"},
{"Postgresql", "pg_config --version"},
{"npm", "npm -v"},
{"Node", "node -v"}
]in your README.md where you'd like the dependency version to be placed. Make sure no characters follow<!– ex_versions –>. ## Example <!-- ex_versions --> below and running the watch function example from above.
Dependency Versions:
Elixir:
$ elixir -v
Erlang/OTP 19 [erts-8.0.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Elixir 1.3.1Node:
$ node -v
v6.1.0npm:
$ npm -v
3.10.3Phoenix:
$ mix phoenix.new -v
Phoenix v1.2.0Postgresql:
$ pg_config --version
PostgreSQL 9.4.4