Search code examples
gitelixirelixir-mix

How to get older tag of a git repository in elixir via mix file


I am trying to install an older version of a library cqerl through mix.exs file in elixir.

This is how my code looks:

 defp deps do
    [
      {:cqerl, git: "https://github.com/matehat/cqerl.git",tag: "v0.9.0"}
    ]

But for some reason, instead of installing the 0.9.0 tag, it is installing the latest tag.

I would like to know what's wrong with my code and how can I correctly pull the right tag from Cqerl repository.

TIA :)


Solution

  • I had to delete the mix.lock file as well along with the deps folder. So, basically I did the following:

    rm mix.lock
    rm -rf deps/
    mix deps.get
    

    That way, it worked.

    I am using Elixir version 1.2.4 right now, and this is a bug in mix. I came to know later that it has been fixed in master via elixir-lang irc.