Current section

Files

Jump to
nerves lib nerves artifact build_runner.ex
Raw

lib/nerves/artifact/build_runner.ex

# SPDX-FileCopyrightText: 2016 Justin Schneck
# SPDX-FileCopyrightText: 2022 Frank Hunleth
#
# SPDX-License-Identifier: Apache-2.0
#
defmodule Nerves.Artifact.BuildRunner do
@moduledoc """
Defines the Nerves build runner behaviour
A build runner is a module that can take package source and produce
artifacts.
"""
@type build_result :: {:ok, build_path :: String.t()} | {:error, reason :: term}
@type archive_result :: {:ok, path :: String.t()} | {:error, reason :: term}
@type clean_result :: :ok | {:error, reason :: term}
@callback build(package :: Nerves.Package.t(), toolchain :: Nerves.Package.t(), opts :: term) ::
build_result
@callback archive(package :: Nerves.Package.t(), toolchain :: Nerves.Package.t(), opts :: term) ::
archive_result
@callback clean(package :: Nerves.Package.t()) :: clean_result
end