mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 22:16:02 +00:00
hugolib: Only run variable variable overwrite test on Go 1.11
This commit is contained in:
2 files changed
+8
-1
No files matched your search
@@ -257,7 +257,10 @@ T2: Content: {{ $combinedText.Content }}|{{ $combinedText.RelPermalink }}
|
||||
b.AssertFileContent("public/rocks/hugo.txt", "Hugo Rocks!")
|
||||
|
||||
}},
|
||||
{"execute-as-template", func() bool { return true }, func(b *sitesBuilder) {
|
||||
{"execute-as-template", func() bool {
|
||||
// TODO(bep) eventually remove
|
||||
return isGo111()
|
||||
}, func(b *sitesBuilder) {
|
||||
b.WithTemplates("home.html", `
|
||||
{{ $var := "Hugo Page" }}
|
||||
{{ if .IsHome }}
|
||||
|
||||
@@ -676,3 +676,7 @@ func dumpPages(pages ...*Page) {
|
||||
func isCI() bool {
|
||||
return os.Getenv("CI") != ""
|
||||
}
|
||||
|
||||
func isGo111() bool {
|
||||
return strings.Contains(runtime.Version(), "1.11")
|
||||
}
|
||||
Reference in new issue
Block a user