mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Only run variable variable overwrite test on Go 1.11
This commit is contained in:
parent
0c8a415483
commit
6022f219f1
2 changed files with 8 additions and 1 deletions
|
@ -257,7 +257,10 @@ T2: Content: {{ $combinedText.Content }}|{{ $combinedText.RelPermalink }}
|
||||||
b.AssertFileContent("public/rocks/hugo.txt", "Hugo Rocks!")
|
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", `
|
b.WithTemplates("home.html", `
|
||||||
{{ $var := "Hugo Page" }}
|
{{ $var := "Hugo Page" }}
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
|
|
|
@ -676,3 +676,7 @@ func dumpPages(pages ...*Page) {
|
||||||
func isCI() bool {
|
func isCI() bool {
|
||||||
return os.Getenv("CI") != ""
|
return os.Getenv("CI") != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isGo111() bool {
|
||||||
|
return strings.Contains(runtime.Version(), "1.11")
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue