MarcoTrevisiol

MarcoTrevisiol

Release for unix includes bat script

I am releasing a small elixir app with mix release. Since I only need the release to run on a linux machine, I do not need any .bat script. I added the option in mix.exs to only include executable for unix. Yet I am not able to get rid of them.

What I did:

mix new example
cd example

then I added the following line in mix.exs, inside “project” function:

releases: [example: [include_executable_for: [:unix]]],

Finally I run mix release. But when I look inside _build/dev/rel/example I find some .bat scripts

$ find _build/ -name '*.bat'
_build/dev/rel/example/releases/0.1.0/env.bat
_build/dev/rel/example/bin/example.bat

I am running the latest stable release of elixir:

$ mix --version
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]                                              

Mix 1.17.3 (compiled with Erlang/OTP 25)

Is there any way to not include these .bat script inside the release? Should I do something differently?

Marked As Solved

wojtekmach

wojtekmach

Hex Core Team

You have a typo, change:

- releases: [example: [include_executable_for: [:unix]]]
+ releases: [example: [include_executables_for: [:unix]]]

This is pretty unfortunate, I’m not sure if we can do much about it though. If Elixir allowed people setting custom release options, which can be very useful for custom tooling, then we should keep that. Or introduce an :extra option that would be a place for custom options and then we could warn on typos like include_executable_for.

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement