Documentation
¶
Index ¶
- Constants
- func CompareChangesToPaths(changes []string, paths []string, additionalGlobs []string) (bool, error)
- func GetRelativeRootPath(absRootPath, workDirRel string) (string, error)
- func IsDotDirectory(path string, d fs.DirEntry) bool
- func MkdirTemp() (string, func(), error)
- func Verbose() bool
- func WriteTempFile(directory, suffix, content string) (string, func(), error)
Constants ¶
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 ¶
GetRelativeRootPath ...
func IsDotDirectory ¶ added in v0.5.0
IsDotDirectory checks if the supplied direcory is starts with a dot.
func MkdirTemp ¶
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 ¶
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.