recipes

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package recipes composes a pack's pipelines.

A recipe builds a pipeline; it does not run one. The caller runs it, which is what lets the TUI show the stages before anything is fetched and lets a dry run skip the sinks that commit.

Index

Constants

View Source
const (
	RecipeAuto        = "auto"
	RecipeGeneric     = "generic"
	RecipeTwemojiSets = "twemoji-sets"

	// RecipeOpenMojiSets syncs the two OpenMoji sets (colour, black) into
	// ichava/icon-sets-openmoji, the only pack that ships OpenMoji. twemoji-sets
	// is Twemoji only.
	RecipeOpenMojiSets = "openmoji-sets"

	// RecipeManifestPack refreshes a pack set by set, each set from the
	// upstream its set manifest names, then commits once.
	RecipeManifestPack = "manifest-pack"
)

Recipe names a pack config's `recipe` field may carry.

View Source
const (
	DefaultUnicodeVersion = settings.DefaultUnicodeVersion
)

Emoji recipe defaults, kept under their old names. The settings registry owns the values now; these alias it so nothing reading the old constants can see a different number.

View Source
const LicencesRoot = "{pack_root}/resources/assets/svg/licenses"

LicencesRoot is where a pack keeps its upstreams' licence texts, one directory per upstream set. It sits beside resources/assets/svg/files, so it is not export-ignored and ships with the icons.

Variables

This section is empty.

Functions

func Build

func Build(pack *config.PackConfig, version string, opts Options) ([]*pipeline.Pipeline, error)

Build returns the pipelines for a pack, in the order they must run.

Dispatch is on the pack's `recipe` field when it names one, else on the pack NAME first and the source type second -- reversing those breaks icon-sets-twemoji, which declares source.type "url" because that is how its *version* is discovered while its assets come from three separate upstreams that only the named recipe knows about.

func Select

func Select(pack *config.PackConfig) string

Select names the recipe a pack runs, or "" when none applies. Every recipe but generic is chosen only by the config's `recipe` field; `auto` (or no field) picks generic for a source it can fetch, and never looks at the pack's name.

Types

type Options

type Options struct {
	// DryRun drops the committing sinks (the version stamp and the git
	// branch) and marks every pipeline with pipeline.ConfigDryRun, so the
	// filesystem and licence sinks report the diff they would make without
	// writing into the pack checkout. Everything a dry run writes stays in the
	// pipeline's own temporary working directory.
	DryRun bool

	// ConfigDir is where a manifest-pack's set manifest lives.
	ConfigDir string

	// Settings is this pack's resolved settings. Nil means the defaults.
	Settings *settings.Resolved

	// Git overrides the git/gh runner, for tests. Nil means real subprocesses.
	Git gitx.Runner

	// Logger receives every pipeline's and every stage's log lines. Nil means
	// slog.Default(), which is what the CLI wants; a server running several
	// syncs at once passes one per run so their lines stay apart.
	Logger *slog.Logger

	// Observer is told when each stage starts and finishes. May be nil.
	Observer pipeline.Observer
}

Options carries what a recipe needs beyond the pack config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL