Add genDocsHelper mage target

Expose the functionality of the hidden `hugo gen docshelper` command as
a mage target.
This commit is contained in:
Cameron Moore 2020-06-05 10:48:37 -05:00 committed by Bjørn Erik Pedersen
parent f720fe56db
commit 889dc47ceb
1 changed files with 6 additions and 1 deletions

View File

@ -66,6 +66,7 @@ func flagEnv() map[string]string {
}
}
// Generate autogen packages
func Generate() error {
generatorPackages := []string{
"tpl/tplimpl/embedded/generate",
@ -101,6 +102,11 @@ func Generate() error {
return nil
}
// Generate docs helper
func GenDocsHelper() error {
return runCmd(flagEnv(), goexe, "run", "-tags", buildTags(), "main.go", "gen", "docshelper")
}
// Build hugo without git info
func HugoNoGitInfo() error {
ldflags = noGitLdflags
@ -334,5 +340,4 @@ func buildTags() string {
return envtags
}
return "none"
}