I'm going through the Programming Elixir
book and currently got to the point of creating a little console using mix escript.build
(similar to this documentation example: https://hexdocs.pm/mix/Mix.Tasks.Escript.Build.html#module-example)
Now, it produces an executable myprojname
in the project folder, which is cool and good.
BUT I really don't want to track executables in source control.
Coming from .NET, I'm used to .gitignore
just ignoring anything under the /bin
path, but the binary Elixir generates is:
- in the project root
- has a different name in every project
What's the best practice for .gitignore
-ing escript files in Elixir project?
So far I've added this line to .gitignore
and it works:
myprojname
But is there a better way that I'm missing? (In .NET, pretty much all projects have the same .gitignore file, because anything to be ignored is usually under a pre-defined path such as /bin
, /obj
etc. or has an extension like .solutionuseroptions
.