added documentation_matchers.go generation

This commit is contained in:
Manuel Carmona
2017-04-10 11:30:23 +02:00
parent d66beade34
commit ca3ae587f3
11 changed files with 250 additions and 34 deletions

View File

@ -23,6 +23,11 @@ const (
vendorTmplPath = "internal/code-generator/assets/vendor.go.tmpl"
vendorTmpl = "vendor.go.tmpl"
documentationYAML = ".linguist/lib/linguist/documentation.yml"
documentationFile = "documentation_matchers.go"
documentationTmplPath = "internal/code-generator/assets/documentation.go.tmpl"
documentationTmpl = "documentation.go.tmpl"
commitPath = ".git/refs/heads/master"
)
@ -43,6 +48,10 @@ func main() {
if err := generator.FromFile(vendorYAML, vendorFile, vendorTmplPath, vendorTmpl, commit, generator.Vendor); err != nil {
log.Println(err)
}
if err := generator.FromFile(documentationYAML, documentationFile, documentationTmplPath, documentationTmpl, commit, generator.Documentation); err != nil {
log.Println(err)
}
}
func getCommit(path string) (string, error) {