distillery v2.1.1 Distillery.Releases.Appup.Transform behaviour View Source
A transform is an appup compilation pass which receives a list of appup instructions, along with metadata about those instructions, such as the source application, the source and target versions involved, and an optional list of configuration options for the transform.
The job of a transform is to, well, apply a transformation to the instruction set, in
order to accomplish some objective that one desires to be automated. A trivial example
of one such transform would be a transform which ensures the purge mode is set to :soft_purge
for all :update
instructions. To see an example of such a transform, look in test/support/purge_transform.ex
Link to this section Summary
Functions
Applies all transforms against the current downgrade instruction.
Applies all transforms against the current upgrade instruction.
Link to this section Types
app()
View Source
app() :: Distillery.Releases.Appup.app()
app() :: Distillery.Releases.Appup.app()
instruction()
View Source
instruction() :: Distillery.Releases.Appup.instruction()
instruction() :: Distillery.Releases.Appup.instruction()
options()
View Source
options() :: [term()]
options() :: [term()]
transform() View Source
version()
View Source
version() :: Distillery.Releases.Appup.appup_ver()
version() :: Distillery.Releases.Appup.appup_ver()
Link to this section Functions
down(instructions, app, v1, v2, list)
View Source
down([instruction()], app(), version(), version(), [transform()]) :: [
instruction()
]
down([instruction()], app(), version(), version(), [transform()]) :: [ instruction() ]
Applies all transforms against the current downgrade instruction.
Additional information required as arguments and passed to transforms are the app the instruction applies to, and the source and target versions involved.
up(instructions, app, v1, v2, list)
View Source
up([instruction()], app(), version(), version(), [transform()]) :: [
instruction()
]
up([instruction()], app(), version(), version(), [transform()]) :: [ instruction() ]
Applies all transforms against the current upgrade instruction.
Additional information required as arguments and passed to transforms are the app the instruction applies to, and the source and target versions involved.
Link to this section Callbacks
down(app, version, version, list, options)
View Source
down(app(), version(), version(), [instruction()], options()) :: [
instruction()
]
down(app(), version(), version(), [instruction()], options()) :: [ instruction() ]
up(app, version, version, list, options)
View Source
up(app(), version(), version(), [instruction()], options()) :: [instruction()]
up(app(), version(), version(), [instruction()], options()) :: [instruction()]