{"action":"created","issue":{"url":"https://api.github.com/repos/boldpoker/edeliver/issues/132","repository_url":"https://api.github.com/repos/boldpoker/edeliver","labels_url":"https://api.github.com/repos/boldpoker/edeliver/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/boldpoker/edeliver/issues/132/comments","events_url":"https://api.github.com/repos/boldpoker/edeliver/issues/132/events","html_url":"https://github.com/boldpoker/edeliver/issues/132","id":169745966,"number":132,"title":"Switching from Exrm to Distillery : erratic behaviour","user":{"login":"Moxide","id":16779013,"avatar_url":"https://avatars.githubusercontent.com/u/16779013?v=3","gravatar_id":"","url":"https://api.github.com/users/Moxide","html_url":"https://github.com/Moxide","followers_url":"https://api.github.com/users/Moxide/followers","following_url":"https://api.github.com/users/Moxide/following{/other_user}","gists_url":"https://api.github.com/users/Moxide/gists{/gist_id}","starred_url":"https://api.github.com/users/Moxide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moxide/subscriptions","organizations_url":"https://api.github.com/users/Moxide/orgs","repos_url":"https://api.github.com/users/Moxide/repos","events_url":"https://api.github.com/users/Moxide/events{/privacy}","received_events_url":"https://api.github.com/users/Moxide/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-06T13:06:23Z","updated_at":"2016-08-07T19:36:13Z","closed_at":null,"body":"Hello,\r\nI'm trying to use Edeliver with Distillery and I'm facing an issue. (Elixir 1.3.2, Erlang 19)\r\nWhen I run **mix edeliver build release**, everything runs as usual until \"Generating release\" :\r\n```\r\n-----> Generating release\r\nusing mix to generate release\r\nChanged release version from 0.0.1 to 0.0.1+distillery-60a45a7-20160806-prod\r\nBuilding release with MIX_ENV=prod.\r\n** (FunctionClauseError) no function clause matching in Mix.env/1\r\n    (mix) lib/mix.ex:211: Mix.env(\"prod\")\r\n    lib/exrm/utils/utils.ex:19: ReleaseManager.Utils.with_env/2\r\n    lib/mix/tasks/release.ex:164: Mix.Tasks.Release.generate_sys_config/1\r\n    lib/mix/tasks/release.ex:74: Mix.Tasks.Release.do_run/1\r\n    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3\r\n    (elixir) lib/enum.ex:651: Enum.\"-each/2-lists^foreach/1-0-\"/2\r\n    (elixir) lib/enum.ex:651: Enum.each/2\r\n    (mix) lib/mix/task.ex:296: Mix.Task.run_task/3\r\n\r\nA remote command failed on:\r\n\r\n  mox@buildserver\r\n\r\nOutput of the command is shown above and the command executed\r\non that host is printed below for debugging purposes:\r\n\r\nFAILED with exit status 1:\r\n\r\n    [ -f ~/.profile ] && source ~/.profile\r\n    set -e\r\n    cd /tmp/erlang/my-app/builds/App\r\n    if [ \"mix\" = \"rebar\" ]; then\r\n      echo \"using rebar to generate release\"\r\n      ./rebar   -f generate\r\n    elif [ \"mix\" = \"relx\" ]; then\r\n      echo \"using relx to generate release\"\r\n      ./relx release\r\n    elif [ \"mix\" = \"mix\" ]; then\r\n      echo \"using mix to generate release\"\r\n      MIX_ENV=\"prod\" LINK_SYS_CONFIG=\"\" LINK_VM_ARGS=\"\" APP=\"App\" AUTO_VERSION=\"git-branch+git-revision+build-date+mix-env\" BRANCH=\"distillery\" SKIP_RELUP_MODIFICATIONS=\"\" RELUP_MODIFICATION_MODULE=\"\" mix do release.version  --verbose,  release --verbose --env=\"prod\" --name=\"App\"\r\n    fi\r\n```\r\nWhen I ssh to the build server and run **MIX_ENV=prod mix help release**, the release task is the Exrm's one and not the Distillery's, hence the error.\r\n\r\nIn **mix.lock**, both Distillery and Exrm dependencies appears. In Edeliver line, Distillery is defined as optional and Exrm is not.\r\n\r\nIf I switch this and rerun **MIX_ENV=prod mix help release**, the Distillery's task shows up. And if I run the above offending line \r\n`MIX_ENV=\"prod\" LINK_SYS_CONFIG=\"\" LINK_VM_ARGS=\"\" APP=\"App\" AUTO_VERSION=\"git-branch+git-revision+build-date+mix-env\" BRANCH=\"distillery\" SKIP_RELUP_MODIFICATIONS=\"\" RELUP_MODIFICATION_MODULE=\"\" mix do release.version  --verbose,  release --verbose --env=\"prod\" --name=\"App\"`\r\nIt succeeds.\r\n\r\nSince Exrm and Distillery both declare a task named \"release\", how Elixir is prioritizing one on the other ?\r\nThanks in advance !\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/boldpoker/edeliver/issues/comments/238103323","html_url":"https://github.com/boldpoker/edeliver/issues/132#issuecomment-238103323","issue_url":"https://api.github.com/repos/boldpoker/edeliver/issues/132","id":238103323,"user":{"login":"schnittchen","id":166765,"avatar_url":"https://avatars.githubusercontent.com/u/166765?v=3","gravatar_id":"","url":"https://api.github.com/users/schnittchen","html_url":"https://github.com/schnittchen","followers_url":"https://api.github.com/users/schnittchen/followers","following_url":"https://api.github.com/users/schnittchen/following{/other_user}","gists_url":"https://api.github.com/users/schnittchen/gists{/gist_id}","starred_url":"https://api.github.com/users/schnittchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schnittchen/subscriptions","organizations_url":"https://api.github.com/users/schnittchen/orgs","repos_url":"https://api.github.com/users/schnittchen/repos","events_url":"https://api.github.com/users/schnittchen/events{/privacy}","received_events_url":"https://api.github.com/users/schnittchen/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T19:36:13Z","updated_at":"2016-08-07T19:36:13Z","body":"That did not work in my case. On the build host, `mix deps.get` fetches exrm, but `mix deps.tree` prints distillery, not exrm."}}
{"actor":{"display_login":"schnittchen"}}