distillery v2.1.1 Distillery.Releases.Appup View Source
This module is responsible for generating appups between two releases.
Link to this section Summary
Functions
Given an application name, and two versions, look for a custom appup which applies.
Generate a .appup for the given application, start version, and upgrade version.
Link to this section Types
Link to this type
app()
View Source
app()
View Source
app() :: atom()
app() :: atom()
Link to this type
appup()
View Source
appup()
View Source
appup() :: {appup_ver(), upgrade_instructions(), downgrade_instructions()}
appup() :: {appup_ver(), upgrade_instructions(), downgrade_instructions()}
Link to this type
appup_ver() View Source
Link to this type
change()
View Source
change()
View Source
change() :: :soft | {:advanced, [term()]}
change() :: :soft | {:advanced, [term()]}
Link to this type
dep_mods()
View Source
dep_mods()
View Source
dep_mods() :: [module()]
dep_mods() :: [module()]
Link to this type
downgrade_instructions()
View Source
downgrade_instructions()
View Source
downgrade_instructions() :: [{appup_ver(), instruction()}]
downgrade_instructions() :: [{appup_ver(), instruction()}]
Link to this type
instruction()
View Source
instruction()
View Source
instruction() ::
{:add_module, module()}
| {:delete_module, module()}
| {:update, module(), :supervisor | change()}
| {:update, module(), change(), dep_mods()}
| {:load_module, module()}
| {:load_module, module(), dep_mods()}
| {:apply, {module(), atom(), [term()]}}
| {:add_application, atom()}
| {:remove_application, atom()}
| {:restart_application, atom()}
| :restart_new_emulator
| :restart_emulator
instruction() :: {:add_module, module()} | {:delete_module, module()} | {:update, module(), :supervisor | change()} | {:update, module(), change(), dep_mods()} | {:load_module, module()} | {:load_module, module(), dep_mods()} | {:apply, {module(), atom(), [term()]}} | {:add_application, atom()} | {:remove_application, atom()} | {:restart_application, atom()} | :restart_new_emulator | :restart_emulator
Link to this type
path_str()
View Source
path_str()
View Source
path_str() :: String.t()
path_str() :: String.t()
Link to this type
upgrade_instructions()
View Source
upgrade_instructions()
View Source
upgrade_instructions() :: [{appup_ver(), instruction()}]
upgrade_instructions() :: [{appup_ver(), instruction()}]
Link to this type
version_str()
View Source
version_str()
View Source
version_str() :: String.t()
version_str() :: String.t()
Link to this section Functions
Link to this function
locate(app, v1, v2)
View Source
locate(app, v1, v2)
View Source
locate(app(), version_str(), version_str()) :: nil | String.t()
locate(app(), version_str(), version_str()) :: nil | String.t()
Given an application name, and two versions, look for a custom appup which applies.
Link to this function
make(application, v1, v2, v1_path, v2_path, transforms \\ [])
View Source
make(application, v1, v2, v1_path, v2_path, transforms \\ [])
View Source
make(app(), version_str(), version_str(), path_str(), path_str(), [module()]) ::
{:ok, appup()} | {:error, term()}
make(app(), version_str(), version_str(), path_str(), path_str(), [module()]) :: {:ok, appup()} | {:error, term()}
Generate a .appup for the given application, start version, and upgrade version.
Parameters
- application: the application name as an atom
- v1: the previous version, such as "0.0.1"
- v2: the new version, such as "0.0.2"
- v1_path: the path to the v1 artifacts (rel/<app>/lib/<app>-0.0.1)
- v2_path: the path to the v2 artifacts (_build/prod/lib/<app>)