Keep Your README Install Instructions Up To Date


CEO & Founder

Brian Cardarella

By default, all new generated Elixir apps via mix newinclude a nice installation snippet in the

However, I am always forgetting to update the version constraint in the whenever I bump my app to a new version. Well, no more, after using this simple unit test:

test "README install version check" do
  app = :my_app

  app_version = "#{Application.spec(app, :vsn)}"
  readme =!("")
  [_, readme_versions] ={:#{app}, "(.+)"}/, readme)

  assert Version.match?(
         Install version constraint in does not match to current app version.
         Current App Version: #{app_version}
         Readme Install Versions: #{readme_versions}


Of course you will need to update the app value to whatever your app’s name is.


DockYard is a digital product agency offering exceptional strategy, design, full stack engineering, web app development, custom software, Ember, Elixir, and Phoenix services, consulting, and training.

Narwin holding a press release sheet while opening the DockYard brand kit box