sevki.org/build/util

Index

Package Files

exec.go util.go

func BuildOut

func BuildOut() string

func Exec

func Exec(o, e io.Writer, cmd string, env, params []string) error

Exec executes a command with and writes to stdout and stderr outputs without combining the two streams.

func GetGitDir

func GetGitDir(p string) string

func GetProjectPath

func GetProjectPath() (ProjectPath string)

func Getenv

func Getenv(s string) string

Getenv returns the envinroment variable. It looks for the envinroment variable in the following order. It checks if the current shell session has an envinroment variable, checks if it's set in the OS specific section in the .build file, and checks it for common in the .build config file.

func HashFiles

func HashFiles(h io.Writer, files []string)

HashFiles will hash files collecetion represented as a string array, If the string in the array is directory it will the directory contents to the array if the string isn't an absolute path, it will assume that it's a export from a dependency and skip that.

func HashFilesWithExt

func HashFilesWithExt(h io.Writer, files []string, ext string)

HashFilesWithExt will hash files collecetion represented as a string array, If the string in the array is directory it will the directory contents to the array if the string isn't an absolute path, it will assume that it's a export from a dependency and skip that.

func HashStrings

func HashStrings(h io.Writer, strs []string)

func RelPPath

func RelPPath(p string) string

Subdirectories

json2build