Burrito.Builder (burrito v1.2.0)
Burrito builds in "phases". Each phase contains any number of "steps" which are executed one after another.
There are 3 phases:
:fetch
- This phase is responsible for downloading or copying in any replacement ERTS builds for cross-build targets.
:patch
- The patch phase injects custom scripts into the build directory, this phase is also where any custom files should be copied into the build directory before being archived.
:build
- This is the final phase in the build flow, it produces the final wrapper binary with a payload embedded inside.
You can add your own steps before and after phases execute. Your custom steps will also receive the build context struct, and can return a modified one to customize a build to your liking.
An example of adding a step before the fetch phase, and after the build phase:
# ... mix.exs file
def releases do
[
my_app: [
steps: [:assemble, &Burrito.wrap/1],
burrito: [
# ... other Burrito configuration
extra_steps: [
fetch: [pre: [MyCustomStepModule, AnotherCustomStepModule]],
build: [post: [CustomStepAgain, YetAnotherCustomStepModule]]
# ...
]
]
]
]
end
# ...