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

Link to this section Functions

Link to this function

down(instructions, app, v1, v2, list) View Source
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.

Link to this function

up(instructions, app, v1, v2, list) View Source
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

Link to this callback

down(app, version, version, list, options) View Source
down(app(), version(), version(), [instruction()], options()) :: [
  instruction()
]

Link to this callback

up(app, version, version, list, options) View Source
up(app(), version(), version(), [instruction()], options()) :: [instruction()]