diff options
| author | Henrique Dias <hacdias@gmail.com> | 2023-11-07 20:45:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-07 11:45:45 -0800 |
| commit | 550450a3b1e07a70a506d872137ea43774d2c5e0 (patch) | |
| tree | d75e2174eeb6ba9197fbf70ce97f3567a6322859 /config.go | |
| parent | 35e7777d1a11bff5e192aaae3145685a6a2aec60 (diff) | |
| download | sally-550450a3b1e07a70a506d872137ea43774d2c5e0.tar.gz | |
feat: add support for other vcs systems (#128)
Adds support to other VCS systems as per the specification.
Defaults to `git` for backwards compatibility.
Renames the internally used `.GitURL` to `.RepoURL` for clarity.
Diffstat (limited to '')
| -rw-r--r-- | config.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -46,6 +46,11 @@ type PackageConfig struct { // Defaults to the URL specified in the top-level config. URL string `yaml:"url"` + // VCS is the version control system of this module. + // + // Defaults to git. + VCS string `yaml:"vcs"` + // Desc is a plain text description of this module. Desc string `yaml:"description"` } @@ -73,5 +78,14 @@ func Parse(path string) (*Config, error) { c.Godoc.Host = host } + // Set default values for the packages. + for name, pkg := range c.Packages { + if pkg.VCS == "" { + pkg.VCS = "git" + } + + c.Packages[name] = pkg + } + return &c, err } |