distillery v1.2.0 Mix.Releases.Config
Responsible for parsing the release configuration file.
Summary
Functions
Gets the current version of the given app and returns it as a string. If the app cannot be loaded, an error is raised. Intended to be used in conjunction with setting the version of a release definition, as shown below
Creates a new environment for building releases. Within an environment, you can set config options which apply to all releases built in that environment
Adds a plugin to the environment or release definition it is part of
Reads and validates a given configuration file.
If the file does not exist, or an error occurs, a Mix.Releases.Config.LoadError
will be raised
Reads and validates a string containing the contents of a config file.
If an error occurs during reading, a Mix.Releases.Config.LoadError
will be raised
Creates a new release definition with the given name. Within a release definition, you can set config options specific to that release
Set a config option within an environment or release definition.
set
takes a keyword list of one or more values to apply. An error
will be raised if set
is used outside of an environment or release definition,
or if the config value being set does not exist
Types
Functions
Gets the current version of the given app and returns it as a string. If the app cannot be loaded, an error is raised. Intended to be used in conjunction with setting the version of a release definition, as shown below.
Usage
release :myapp do
set version: current_version(:myapp)
end
Creates a new environment for building releases. Within an environment, you can set config options which apply to all releases built in that environment.
Usage
environment :dev do
set dev_mode: true
set include_erts: false
end
Adds a plugin to the environment or release definition it is part of.
Usage
release :myapp do
plugin MyApp.ReleasePlugin
end
Reads and validates a given configuration file.
If the file does not exist, or an error occurs, a Mix.Releases.Config.LoadError
will be raised.
Reads and validates a string containing the contents of a config file.
If an error occurs during reading, a Mix.Releases.Config.LoadError
will be raised.
Creates a new release definition with the given name. Within a release definition, you can set config options specific to that release
Usage
release :myapp do
set version: "0.1.0",
set applications: [:other_app]
set code_paths: ["/some/code/path"]
end
Set a config option within an environment or release definition.
set
takes a keyword list of one or more values to apply. An error
will be raised if set
is used outside of an environment or release definition,
or if the config value being set does not exist.
Usage
environment :dev do
set dev_mode: true
end