View Source Nerves.Artifact.BuildRunner behaviour (nerves v1.11.3)

Defines the Nerves build runner behaviour

A build runner is a module that can take package source and produce artifacts.

Summary

Types

archive_result()

@type archive_result() :: {:ok, path :: String.t()} | {:error, reason :: term()}

build_result()

@type build_result() :: {:ok, build_path :: String.t()} | {:error, reason :: term()}

clean_result()

@type clean_result() :: :ok | {:error, reason :: term()}

Callbacks

archive(package, toolchain, opts)

@callback archive(
  package :: Nerves.Package.t(),
  toolchain :: Nerves.Package.t(),
  opts :: term()
) ::
  archive_result()

build(package, toolchain, opts)

@callback build(
  package :: Nerves.Package.t(),
  toolchain :: Nerves.Package.t(),
  opts :: term()
) ::
  build_result()

clean(package)

@callback clean(package :: Nerves.Package.t()) :: clean_result()