7rans
Hi, I have either found a bug in Elixir’s mix release task or I am doing something wrong.
I added a releases section to my mix.exs def project do section as follows:
app: :nai,
...
default_release: :naiims,
releases: [
naiims: [
include_executables_for: [:unix],
applications: [runtime_tools: :permanent],
steps: [:assemble, :tar]
]
]
The actual module namespace I use in my code is Nai. and all my config’s are config :nai, ....
After running MIX_ENV=prod mix release I have executables in _build/prod/rel/naiims/bin/, the main executable being _build/prod/rel/naiims/bin/naiims, which is right. But the other scripts (server and migrate) are calling nai! Here is the server script for example:
#!/bin/sh
cd -P -- "$(dirname -- "$0")"
PHX_SERVER=true exec ./nai start
It should be ./naiims not ./nai.
Btw, I also noticed it is still generates the windows .bat files even though my config specifies :unix.
(Personally I wish there was just the one exectuable (e.g. naiims) and neither of other two, and one could just say naiims migrate for migrations.)
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
Likely a stupid advice but have you tried removing the
_buildanddepsdirectories and domix do deps.get, release?7rans
I realized that these files were being produced by
mix phx.gen.releaseand that I don’t have to run that task every time I do amix release. Just need to run it the one time. So even though it generates slightly incorrect scripts, I can fix them and forget about it (at least for a while).I guess I should report this as a bug to the Phoenix project.
BTW I tried your suggestion to fix a more insidious issue I am having. But to no avail. Nonetheless, thanks for the suggestion.