Return group color if language has none

This commit is contained in:
Lauris BH
2020-03-21 15:37:39 +02:00
parent cfaa7a1711
commit 97a26011a9
13 changed files with 293 additions and 1 deletions

View File

@ -80,6 +80,11 @@ var (
colorsTmplPath = filepath.Join(assetsDir, "colors.go.tmpl")
colorsTmpl = "colors.go.tmpl"
// groups.go generation
groupsFile = filepath.Join("data", "groups.go")
groupsTmplPath = filepath.Join(assetsDir, "groups.go.tmpl")
groupsTmpl = "groups.go.tmpl"
commitPath = filepath.Join(".linguist", ".git", "HEAD")
)
@ -112,6 +117,7 @@ func main() {
{generator.Commit, "", "", commitFile, commitTmplPath, commitTmpl, commit},
{generator.MimeType, languagesYAML, "", mimeTypeFile, mimeTypeTmplPath, mimeTypeTmpl, commit},
{generator.Colors, languagesYAML, "", colorsFile, colorsTmplPath, colorsTmpl, commit},
{generator.Groups, languagesYAML, "", groupsFile, groupsTmplPath, groupsTmpl, commit},
}
for _, file := range fileList {