core

package
v0.21.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// OutputDir is the destination for CI artifacts
	OutputDir = "./var"
)

Variables

This section is empty.

Functions

func CompareChangesToPaths added in v0.8.0

func CompareChangesToPaths(changes []string, paths []string, additionalGlobs []string) (bool, error)

CompareChangesToPaths takes a list of paths comapring if the first matches the latter. You can also add additional globs to match the first list.

func GetRelativeRootPath

func GetRelativeRootPath(absRootPath, workDirRel string) (string, error)

GetRelativeRootPath ...

func IsDotDirectory added in v0.5.0

func IsDotDirectory(path string, d fs.DirEntry) bool

IsDotDirectory checks if the supplied direcory is starts with a dot.

func MkdirTemp

func MkdirTemp() (string, func(), error)

MkdirTemp creates a new temporary directory in the default directory for temporary files, as returned by TempDir, and returns the pathname of the new directory. The new directory's name is generated by adding a random string to the end of the name of the directory of the repository. The directory is created with mode 0o700 (before umask). Multiple programs or goroutines calling MkdirTemp simultaneously will not choose the same directory. It is the caller's responsibility to call the returned cleanup function when the directory is no longer needed. If cleanup errors it will panic.

func Verbose added in v0.21.0

func Verbose() bool

Verbose returns true if the magefile is running in verbose mode.

func WriteTempFile

func WriteTempFile(directory, suffix, content string) (string, func(), error)

WriteTempFile writes the content to a temp file in the provided with a random prefix and the provided suffix. Returns a cleanup function that the caller is expected to call. If cleanup errors it will panic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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