View Source Horizon.Ops.Utils (horizon v0.1.2)

Horizon.Ops is a tool for building and deploying Elixir applications to FreeBSD hosts.

Summary

Functions

Link to this function

copy_static_file(arg, overwrite, executable, opts, target_fn)

View Source
@spec copy_static_file(
  {String.t(), String.t()},
  boolean(),
  boolean(),
  keyword(),
  function()
) ::
  no_return()

Copy a file from source to target, overwriting if necessary.

Example

  iex> safe_copy_file(:horizon_helpers, app, overwrite, false, opts, &Path.join(&2[:bin_path], &1))
Link to this function

create_file_from_template(arg, app, overwrite, executable, opts, assigns_fn, target_fn)

View Source
@spec create_file_from_template(
  {String.t(), String.t()},
  String.t() | atom(),
  boolean(),
  boolean(),
  keyword(),
  function(),
  function()
) :: no_return()

Create a file from a template.

Example

  iex> create_file_from_template("source", "target", true, false, %{}, &assigns/2, fn target, opts -> target end)
Link to this function

safe_copy_file(source, target, overwrite, executable \\ false)

View Source
@spec safe_copy_file(String.t(), String.t(), boolean(), boolean()) :: no_return()

Safely copy a file from source to target.

Example

    iex> safe_copy_file("source", "target", true)
    Created target
Link to this function

safe_write(data, file, overwrite, executable \\ false)

View Source
Link to this function

validate_releases(releases)

View Source
@spec validate_releases(keyword()) :: :ok | nil

Validate the releases configuration for nil values.

Examples

iex> validate_releases([..., build_user: nil, ..]) releases #=> ["phx_only -> build_user", "phx_only -> build_host"]