mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Add genDocsHelper mage target
Expose the functionality of the hidden `hugo gen docshelper` command as a mage target.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
f720fe56db
commit
889dc47ceb
@@ -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"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user