Mix edeliver doesn't seem to recognize updates to my mix.exs file

72 Views Asked by At

I just updated Elixir on my application and I’m trying to use the command mix edeliver build release --branch="$CURRENT_BRANCH" --auto-version=build-date+build-time+git-branch+git-revision to build a release, but it keeps telling me my mix.exs file specifies the previous version of Elixir.

(Partial) content of mix.exs:

  def project do
    [
      app: :project_name,
      version: version(),
      elixir: "~> 1.13.4",
      elixirc_paths: elixirc_paths(Mix.env()),
      compilers: [:phoenix] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps(),
      preferred_cli_env: [
        vcr: :test,
        "vcr.delete": :test,
        "vcr.check": :test,
        "vcr.show": :test
      ]
    ]
  end

How do I get the build command to work with the new version of Elixir? What else should I be trying/checking?

** (Mix) You're trying to run :project_name on Elixir v1.13.4 but it has declared in its mix.exs file it supports only Elixir ~> 1.8.1

Running cat mix.exs confirms I’ve got the right version in the Mix file in the directory where I’m trying to run the build command. I've restarted my machine as well. I’ve searched my workspace for any additional mix.exs files or any occurrences of 1.8.1, but to no avail.

1

There are 1 best solutions below

0
On

It's not clear which version of edeliver you're running, but it looks like specific versions of edeliver build with specific versions of elixir. According to the Github page, version 1.6 of edeliver builds with elixir 1.8. If you want to build with elixir 1.13, you should try setting edeliver to version 1.9 in your mix.exs:

defp deps do
  [
    ...
    {:edeliver, ">= 1.9.2"},
    ...
  ]
end