taskfile

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package taskfile scaffolds the project's Task runner files: a per-service Taskfile.yaml and the root Taskfile.yaml that includes them.

Both files are *managed* — they're fully regenerated from project.toml on every Run so project-level setting changes (flipping Doppler, adding a service, changing the DB engine) reach every task. User customisations belong in a sibling `Taskfile.local.yaml`, which the managed Taskfiles `include` optionally and which Run never touches.

See docs/MANAGED_FILES.md for the project-wide convention.

Index

Constants

View Source
const (
	// ServiceFile is the per-service Task runner file.
	ServiceFile = "Taskfile.yaml"
	// RootFile is the project-level Task runner that includes every service.
	// It is named Taskfile.yaml so `task` discovers it without a --taskfile
	// flag; it never collides with a service file, which lives in a subdir.
	RootFile = "Taskfile.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Doppler        bool
	DopplerProject string
	HotReload      bool
	Containerized  bool
	// Services holds per-service settings (currently only the DB engine).
	// Tasks like `migrate:*` and `generate` appear only for services that
	// actually use a database.
	Services map[string]projectcfg.ServiceConfig
}

Options carries the project settings the generated tasks depend on.

type Taskfile

type Taskfile struct {
	// contains filtered or unexported fields
}

Taskfile scaffolds Task runner files under a project root.

func New

func New(rootPath string, opts Options) *Taskfile

func (*Taskfile) Run

func (t *Taskfile) Run() ([]string, error)

Run regenerates Taskfile.yaml — both the per-service files and the root — so they always reflect the current project settings. User customisations belong in a sibling `Taskfile.local.yaml`, which the managed Taskfiles `include` optionally and which Run never touches.

Jump to

Keyboard shortcuts

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