diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-07-20 17:32:20 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-07-20 19:21:35 +0300 |
commit | 66202281e290fdca45c079fb34a18b14ce060bde (patch) | |
tree | c6c5c5e0c8fb301893cd2ca32a826a6c76a68eec | |
parent | 95f2f00bccb80d39934159b2fb94f31d0b4ce46a (diff) |
Update to latest Hugo
-rw-r--r-- | build/go.mod | 2 | ||||
-rw-r--r-- | build/go.sum | 4 | ||||
-rw-r--r-- | build/main.go | 22 |
3 files changed, 24 insertions, 4 deletions
diff --git a/build/go.mod b/build/go.mod index 00159a9..5a15f07 100644 --- a/build/go.mod +++ b/build/go.mod @@ -29,7 +29,7 @@ require ( github.com/go-stomp/stomp v2.0.2+incompatible // indirect github.com/gobuffalo/envy v1.7.0 // indirect github.com/gocql/gocql v0.0.0-20190122205811-30de9a1866a8 // indirect - github.com/gohugoio/hugo v0.55.7-0.20190719170533-181f5fb81fcc + github.com/gohugoio/hugo v0.55.7-0.20190720143133-99eafa8257df github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95 github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect github.com/google/subcommands v0.0.0-20181012225330-46f0354f6315 // indirect diff --git a/build/go.sum b/build/go.sum index ff2d18c..8aad4c6 100644 --- a/build/go.sum +++ b/build/go.sum @@ -228,8 +228,11 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gohugoio/hugo v0.55.6-0.20190528185734-ff2807ddb7dd h1:pmdV5e617nBptikClFQ5cooXCewj4GSuplqlbXgq1GU= github.com/gohugoio/hugo v0.55.6-0.20190528185734-ff2807ddb7dd/go.mod h1:/uOB8D9JAvVQxYYAjZjiNNHp0V1IRB4CsDQI3x3UAt8= +github.com/gohugoio/hugo v0.55.6 h1:EJFziF4f4qlhg4rT1T225seKt83w1ZDiWbmUCwwrmoI= github.com/gohugoio/hugo v0.55.7-0.20190719170533-181f5fb81fcc h1:n+GxyHH5nfyWUILpFWG8Yqoligz12UGIpYlDlWJI/eE= github.com/gohugoio/hugo v0.55.7-0.20190719170533-181f5fb81fcc/go.mod h1:zlIS9JHjPt1tHExk3XXyMZE+vZVe8ZflPiWuKzbt5fM= +github.com/gohugoio/hugo v0.55.7-0.20190720143133-99eafa8257df h1:ciVwsQLNqVWbxebODicBDNTCv+qP7Bib2HVtZee5xWs= +github.com/gohugoio/hugo v0.55.7-0.20190720143133-99eafa8257df/go.mod h1:rpRmwsXJ89MNE/Twsl6VIZml6wwOW01cztTQNFOBbIA= github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95 h1:sgew0XCnZwnzpWxTt3V8LLiCO7OQi3C6dycaE67wfkU= github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95/go.mod h1:bOlVlCa1/RajcHpXkrUXPSHB/Re1UnlXxD1Qp8SKOd8= github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= @@ -463,6 +466,7 @@ github.com/olekukonko/tablewriter v0.0.0-20180506121414-d4647c9c7a84/go.mod h1:v github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= diff --git a/build/main.go b/build/main.go index fd47bf8..7b44603 100644 --- a/build/main.go +++ b/build/main.go @@ -13,7 +13,7 @@ import ( "runtime" "strings" - "github.com/gohugoio/hugo/mods" + "github.com/gohugoio/hugo/modules" testmods "github.com/gohugoio/testmodBuilder/mods" "github.com/pkg/errors" "github.com/shurcooL/go/osutil" @@ -99,8 +99,24 @@ func (b *mb) initGoMods() error { return nil } -func (b *mb) newModulesHandler(m *testmods.Md) *mods.Client { - return mods.NewClient(b.fs, true, b.abs(m.Name()), "", m.Paths()) +func (b *mb) newModulesHandler(m *testmods.Md) *modules.Client { + + pths := m.Paths() + imports := make([]modules.Import, len(pths)) + for i, v := range pths { + imports[i] = modules.Import{Path: v} + } + + modConfig := modules.DefaultModuleConfig + modConfig.Imports = imports + + client := modules.NewClient(modules.ClientConfig{ + Fs: b.fs, + WorkingDir: b.abs(m.Name()), + ModuleConfig: modConfig, + }) + + return client } func (b *mb) abs(name string) string { |