Documentation ¶
Index ¶
Constants ¶
const (
// DepsFileName is the name of the DEPS file.
DepsFileName = "DEPS"
)
Variables ¶
This section is empty.
Functions ¶
func NormalizeDep ¶
NormalizeDep normalizes the dependency ID to account for differences, eg. the URL scheme and .git suffix for git repos and the ${platform} suffix for CIPD packages.
Types ¶
type DepsEntries ¶
DepsEntries represents all entries in a DEPS file.
func ParseDeps ¶
func ParseDeps(depsContent string) (DepsEntries, error)
ParseDeps parses the DEPS file content and returns a map of normalized dependency ID to DepsEntry. It does not attempt to understand the full Python syntax upon which DEPS is based and may break completely if the file takes an unexpected format.
func ParseDepsNoNormalize ¶
func ParseDepsNoNormalize(depsContent string) (DepsEntries, error)
ParseDepsNoNormalize is like ParseDeps but does not normalize dependency IDs.
func (DepsEntries) Get ¶
func (e DepsEntries) Get(dep string) *DepsEntry
Get retrieves the DepsEntry with the given ID, accounting for normalization. Returns the DepsEntry or nil if the entry was not found.
type DepsEntry ¶
type DepsEntry struct { // Id describes what the DepsEntry points to, eg. for Git dependencies // it is the normalized repo URL, and for CIPD packages it is the // package name. Id string // Version is the currently-pinned version of this dependency. Version string // Path is the path to which the dependency should be downloaded. It is // also used as the key in the 'deps' map in the DEPS file. Path string // Type indicates the type of the dependency. Type DepType }
DepsEntry represents a single entry in a DEPS file. Note that the 'deps' dict may specify that multiple CIPD package are unpacked to the same location; a DepsEntry refers to the dependency, not the path, so each CIPD package would get its own DepsEntry despite their sharing one key in the 'deps' dict.