Documentation ¶
Index ¶
- Constants
- func GitRemote(pkg string) string
- type Config
- type Dependencies
- type Dependency
- type Repo
- func (repo *Repo) Checkout(commit string) error
- func (repo *Repo) Clone(branchOrTag string) error
- func (repo *Repo) Exec(cmd string, arg ...string) (string, error)
- func (repo *Repo) Fetch() error
- func (repo *Repo) Pull() error
- func (repo *Repo) Remote() string
- func (repo *Repo) Root() string
- func (repo *Repo) State() *State
- type State
- type States
Constants ¶
View Source
const ( // CurrentVersion of the configuration file. CurrentVersion = "1.0" // ConfigFileName is the configuration file name. ConfigFileName = "pathdep.yaml" )
View Source
const ( BranchPrefix = "refs/heads/" TagPrefix = "refs/tags/" )
Prefixes for the refs.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Dir string `yaml:"-"` Version string Dependencies Dependencies }
Config holds the configuration.
func NewConfigFromDir ¶
NewConfigFromDir creates a new configuration from the configuration file in the directory.
type Dependencies ¶
type Dependencies []*Dependency
Dependencies provides a sortable slice of dependencies.
func (Dependencies) Len ¶
func (d Dependencies) Len() int
func (Dependencies) Less ¶
func (d Dependencies) Less(i, j int) bool
func (Dependencies) Swap ¶
func (d Dependencies) Swap(i, j int)
type Dependency ¶
type Dependency struct { Import string Commit string `json:",omitempty" yaml:",omitempty"` Tag string `json:",omitempty" yaml:",omitempty"` Branch string `json:",omitempty" yaml:",omitempty"` }
Dependency holds dependency information.
type Repo ¶
type Repo struct {
ImportPath string
}
Repo holds information for the git repo.
func NewFromImportPath ¶
NewFromImportPath creates a new repo from the import path.
Click to show internal directories.
Click to hide internal directories.