mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
parent
6019953769
commit
0f921ace6f
3 changed files with 28 additions and 1 deletions
|
@ -50,6 +50,7 @@ func TestUnfinished(t *testing.T) {
|
|||
|
||||
p := commonTestScriptsParam
|
||||
p.Dir = "testscripts/unfinished"
|
||||
//p.UpdateScripts = true
|
||||
|
||||
testscript.Run(t, p)
|
||||
}
|
||||
|
|
|
@ -292,8 +292,10 @@ func (c *Client) Vendor() error {
|
|||
}
|
||||
}
|
||||
|
||||
// Also include any theme.toml or config.* files in the root.
|
||||
// Also include any theme.toml or config.* or hugo.* files in the root.
|
||||
configFiles, _ := afero.Glob(c.fs, filepath.Join(dir, "config.*"))
|
||||
configFiles2, _ := afero.Glob(c.fs, filepath.Join(dir, "hugo.*"))
|
||||
configFiles = append(configFiles, configFiles2...)
|
||||
configFiles = append(configFiles, filepath.Join(dir, "theme.toml"))
|
||||
for _, configFile := range configFiles {
|
||||
if err := hugio.CopyFile(c.fs, configFile, filepath.Join(vendorDir, t.Path(), filepath.Base(configFile))); err != nil {
|
||||
|
|
24
testscripts/commands/mod_vendor.txt
Normal file
24
testscripts/commands/mod_vendor.txt
Normal file
|
@ -0,0 +1,24 @@
|
|||
dostounix golden/vendor.txt
|
||||
|
||||
hugo mod vendor
|
||||
cmp _vendor/modules.txt golden/vendor.txt
|
||||
ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml
|
||||
stdout 'config.toml'
|
||||
ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withhugotoml
|
||||
stdout 'hugo.toml'
|
||||
|
||||
|
||||
-- hugo.toml --
|
||||
title = "Hugo Modules Test"
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
|
||||
[[module.imports]]
|
||||
path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
|
||||
-- go.mod --
|
||||
go 1.19
|
||||
|
||||
module github.com/gohugoio/testmod
|
||||
-- golden/vendor.txt --
|
||||
# github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0
|
||||
# github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
|
Loading…
Reference in a new issue