aboutsummaryrefslogtreecommitdiffhomepage
path: root/magefile.go
diff options
context:
space:
mode:
authorCameron Moore <[email protected]>2020-06-05 10:48:37 -0500
committerBjørn Erik Pedersen <[email protected]>2020-06-15 20:07:28 +0200
commit889dc47ceba9cf5cbd6e61a9222a5e54cd562332 (patch)
treedaa031d312b16e814d6c5727a2623b90935a1191 /magefile.go
parentf720fe56db9e064d10b86d98e7bbd40fb1c8489f (diff)
downloadhugo-889dc47ceba9cf5cbd6e61a9222a5e54cd562332.tar.gz
hugo-889dc47ceba9cf5cbd6e61a9222a5e54cd562332.zip
Add genDocsHelper mage target
Expose the functionality of the hidden `hugo gen docshelper` command as a mage target.
Diffstat (limited to 'magefile.go')
-rw-r--r--magefile.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/magefile.go b/magefile.go
index f913cec17..9b9dbd3d5 100644
--- a/magefile.go
+++ b/magefile.go
@@ -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"
-
}