Deploy on WebServer after upgrade to 1.9.2-otp-22

Hi together,

this is my first post, i hope this is the right place.
My english is not the best… so i hope u guys can understand me.

i took over a relativly big webproject from an internetagency.
they used erlang 21.0.3, elixir 1.6.6-otp-21, nodejs 8.12.0.

My plan was/is to update all languages. On my local mac, everything works fine.
elixir 1.9.2-otp-22, erlang 22.1.4, nodejs 12.12.0.

I had to fix some dependencies.
Than i plan to deploy to our staging server. (test server).

We got some tools to do this.
But it doenst work.

TASK [deploy : create distillery release] **************************************************************************************************************************************************************************************************************************************
failed: [staging-01] (item=bash -lc “mix release --profile=shakebox:staging”) => {“ansible_loop_var”: “item”, “changed”: true, “cmd”: [“bash”, “-lc”, “mix release --profile=shakebox:staging”], “delta”: “0:00:01.974561”, “end”: “2019-10-22 22:21:08.566658”, “item”: “bash -lc “mix release --profile=shakebox:staging””, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-10-22 22:21:06.592097”, “stderr”: “** (Mix) Could not invoke task “release”: 1 error found!\n–profile : Unknown option”, “stderr_lines”: ["** (Mix) Could not invoke task “release”: 1 error found!", “–profile : Unknown option”], “stdout”: “”, “stdout_lines”: []}

then, when i try to fix this at the ssh server:
mix release --profile=shakebox:staging

** (Mix) Could not invoke task “release”: 1 error found!
–profile : Unknown option

(here i tryed this with --all, or --upgrade as u can see, everytime the same result.

I tryed somany thinks, that i found on the Internet, but nothing worked.
The Problem is, i´am/we´are very big elixir noobs. We came from rails und no have to figure everything out by our own.

I hope someone can help me, or have some tipp/ideas.
best regards

Hi @b4umchen, if you’re on Elixir 1.9 and you’re trying to use distillery releases you need to make sure you’re on the latest distillery version and then use the mix distillery.release command instead of the mix release command. This is because in Elixir 1.9, Mix itself got a built in release command.


hey @benwilson512,
first: thx a lot!
that was the solution

i was on the right way, but i just changed the use Mix.Releases.Config, to use Distillery.Releases.Config,
and nothing happend. So mix distillery.release was the key.

But, where can i get the information else than here?
I realy searched a lot, before i asked here.

did i over read that in the documentation?

as i asked i fond it directly…
thx a lot again!

best regards b4umchen

mix release task docs are a good place to start.

1 Like