mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add genDocsHelper mage target
Expose the functionality of the hidden `hugo gen docshelper` command as a mage target.
This commit is contained in:
parent
f720fe56db
commit
889dc47ceb
1 changed files with 6 additions and 1 deletions
|
@ -66,6 +66,7 @@ func flagEnv() map[string]string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Generate autogen packages
|
||||||
func Generate() error {
|
func Generate() error {
|
||||||
generatorPackages := []string{
|
generatorPackages := []string{
|
||||||
"tpl/tplimpl/embedded/generate",
|
"tpl/tplimpl/embedded/generate",
|
||||||
|
@ -101,6 +102,11 @@ func Generate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Generate docs helper
|
||||||
|
func GenDocsHelper() error {
|
||||||
|
return runCmd(flagEnv(), goexe, "run", "-tags", buildTags(), "main.go", "gen", "docshelper")
|
||||||
|
}
|
||||||
|
|
||||||
// Build hugo without git info
|
// Build hugo without git info
|
||||||
func HugoNoGitInfo() error {
|
func HugoNoGitInfo() error {
|
||||||
ldflags = noGitLdflags
|
ldflags = noGitLdflags
|
||||||
|
@ -334,5 +340,4 @@ func buildTags() string {
|
||||||
return envtags
|
return envtags
|
||||||
}
|
}
|
||||||
return "none"
|
return "none"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue