ReleaseKit.Manifest (ReleaseKit v0.2.1)

Copy Markdown

Manifest describing a built OTP release artifact.

The manifest is intentionally deployment-tool neutral. It records the release tarball, runtime command, environment hints, and an optional HTTP health check. ReleaseKit writes the external map form as ETF so consumers can inspect it with ordinary BEAM tooling without depending on ReleaseKit at runtime.

Summary

Functions

Builds a manifest struct from normalized options.

Reads a typed manifest from ETF.

Validates a typed manifest contract.

Writes a manifest as ETF.

Types

env()

@type env() :: %{clear: %{required(String.t()) => String.t()}, secret: [String.t()]}

health_check()

@type health_check() :: %{path: String.t(), port: pos_integer(), url: String.t()}

runtime()

@type runtime() :: %{command: [String.t()]}

t()

@type t() :: %ReleaseKit.Manifest{
  app: String.t(),
  artifact: ReleaseKit.ArtifactInfo.t() | nil,
  assets: [ReleaseKit.AssetInfo.t()],
  build: ReleaseKit.BuildInfo.t() | nil,
  env: env(),
  format: atom(),
  format_version: pos_integer(),
  health_check: health_check() | nil,
  mix_env: String.t(),
  release: String.t(),
  runtime: runtime(),
  tarball: Path.t(),
  target: ReleaseKit.Target.t() | nil,
  tool: String.t(),
  version: String.t()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Builds a manifest struct from normalized options.

read!(path)

@spec read!(Path.t()) :: t()

Reads a typed manifest from ETF.

validate!(manifest)

@spec validate!(term()) :: t()

Validates a typed manifest contract.

write!(manifest, path)

@spec write!(t(), Path.t()) :: :ok

Writes a manifest as ETF.