project

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COMPARE_TO      = "compare-to"
	PREVIOUS_COMMIT = "previous-commit"
)

Variables

View Source
var (
	ErrCmdDoesNotExist = errors.New("command does not exists")
)

Functions

func BuildForceWithoutTag added in v0.0.42

func BuildForceWithoutTag(name *string, rootDir string, noDep bool) error

func BuildTag added in v0.0.7

func BuildTag(name *string, tag string, rootDir string) error

func BuildWithoutTag added in v0.0.42

func BuildWithoutTag(name *string, rootDir string, noDep bool) error

Types

type Dependencies added in v0.0.39

type Dependencies []*Project

type Env added in v0.0.17

type Env map[string]string

func (Env) ToSlice added in v0.0.17

func (e Env) ToSlice() []string

type Project added in v0.0.4

type Project struct {
	// BaseDir is the directory where the configuration file is located
	BaseDir string `mapstructure:"-"`
	// command to build the project
	BuildScript string `mapstructure:"build"`
	// where the config file is located
	ConfigFile string `mapstructure:"-"`
	// list of dependency folders
	DependsOn    []string `mapstructure:"depends_on"`
	Dependencies Dependencies
	Disable      bool
	Env          []struct {
		Name  string
		Value string
	}
	Ignore        []string
	IsLibrary     bool `mapstructure:"is_library"`
	Name          string
	RootDir       string
	Scripts       map[string]string
	Strategies    Strategies
	Tag           bool   `mapstructure:"tag"`
	VersionScript string `mapstructure:"version"`
	// WorkDir is the directory where the work happen
	WorkDir string `mapstructure:"workdir"`
	// contains filtered or unexported fields
}

func Find added in v0.0.7

func Find(name string, rootDir string) *Project

func FindByName added in v0.0.26

func FindByName(rootDir, name string) *Project

func New added in v0.0.8

func New(dir, rootDir string, isDependency ...bool) (p *Project)

New reads current config in directory the function is expecting full path as argument

func (*Project) Run added in v0.0.4

func (p *Project) Run(s string) error

Run a command by its name

func (*Project) Version added in v0.0.13

func (p *Project) Version() string

func (*Project) WasUpdated added in v0.0.4

func (p *Project) WasUpdated(noDep bool) bool

type Projects added in v0.0.16

type Projects map[string]*Project

func FindAll added in v0.0.7

func FindAll(rootDir string) Projects

func FindAllUpdated added in v0.0.7

func FindAllUpdated(rootDir string, noDep bool) Projects

func (Projects) ToSlice added in v0.0.16

func (projs Projects) ToSlice(noDep bool) []map[string]interface{}

type Strategies added in v0.0.39

type Strategies map[string]Strategy

func (Strategies) UpdatedFiles added in v0.0.39

func (strategies Strategies) UpdatedFiles() []string

type Strategy

type Strategy struct {
	Branch string
	Only   string
}

Jump to

Keyboard shortcuts

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