From 148da01c28ccd38eb872c801a65175e9d3e48a4d Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Mon, 17 Feb 2020 21:58:24 -0800 Subject: [PATCH] Use appscode/static-assets@v0.4.0 Signed-off-by: Tamal Saha --- Makefile | 4 ++-- cmds/aggregator.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- .../appscode/static-assets/api/types.go | 20 +++++++++++-------- vendor/modules.txt | 2 +- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 8f91677..4374e08 100644 --- a/Makefile +++ b/Makefile @@ -52,8 +52,8 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS)) ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) -GO_VERSION ?= 1.12.9 -BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION)-stretch +GO_VERSION ?= 1.13.8 +BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION) OUTBIN = bin/$(OS)_$(ARCH)/$(BIN) ifeq ($(OS),windows) diff --git a/cmds/aggregator.go b/cmds/aggregator.go index 8933bf7..a2f337c 100644 --- a/cmds/aggregator.go +++ b/cmds/aggregator.go @@ -33,12 +33,12 @@ type PageInfo struct { // Git GitInfo `json:"git"` } -func (p PageInfo) Map(extra map[string]interface{}) (map[string]interface{}, error) { +func (p PageInfo) Map(extra map[string]string) (map[string]string, error) { data, err := json.Marshal(p) if err != nil { return nil, err } - var m map[string]interface{} + var m map[string]string err = json.Unmarshal(data, &m) if err != nil { return nil, err diff --git a/go.mod b/go.mod index 3f1054e..00000f9 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/appscodelabs/hugo-tools require ( github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc - github.com/appscode/static-assets v0.3.1 + github.com/appscode/static-assets v0.4.0 github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 github.com/gohugoio/hugo v0.49.1 github.com/imdario/mergo v0.3.7 diff --git a/go.sum b/go.sum index 6b47c5e..f74813f 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkx github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc h1:Q5jwbRq/a1Tien+Is8Zn6HMBRgE13+UOQ9mTvrIuvuE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= -github.com/appscode/static-assets v0.3.1 h1:uG3qZKGODLmFf1YC+Cw3qDoRGUmfdXFGqGZtkVJO/cw= -github.com/appscode/static-assets v0.3.1/go.mod h1:Bvk6peljX6QnzrfYfz+cetuVO+icWh/sTlkZ7gP1I/s= +github.com/appscode/static-assets v0.4.0 h1:7GM14BWNbmTEKU+ejufOOrgx6cm2GCA1CKLFwpSXqqg= +github.com/appscode/static-assets v0.4.0/go.mod h1:Bvk6peljX6QnzrfYfz+cetuVO+icWh/sTlkZ7gP1I/s= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/bep/debounce v1.1.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bep/gitmap v1.0.0/go.mod h1:g9VRETxFUXNWzMiuxOwcudo6DfZkW9jOsOW0Ft4kYaY= diff --git a/vendor/github.com/appscode/static-assets/api/types.go b/vendor/github.com/appscode/static-assets/api/types.go index 8698766..70224cd 100644 --- a/vendor/github.com/appscode/static-assets/api/types.go +++ b/vendor/github.com/appscode/static-assets/api/types.go @@ -17,17 +17,18 @@ type Image struct { } type URLRef struct { - DomainKey string `json:"domainKey"` - Path string `json:"path"` + DomainKey string `json:"domainKey"` + Path string `json:"path"` + ThemeColor string `json:"themeColor"` } type ProductVersion struct { - Version string `json:"version"` - HostDocs bool `json:"hostDocs"` - Show bool `json:"show,omitempty"` - DocsDir string `json:"docsDir,omitempty"` // default: "docs" - Branch string `json:"branch,omitempty"` - Info map[string]interface{} `json:"info,omitempty"` + Version string `json:"version"` + HostDocs bool `json:"hostDocs"` + Show bool `json:"show,omitempty"` + DocsDir string `json:"docsDir,omitempty"` // default: "docs" + Branch string `json:"branch,omitempty"` + Info map[string]string `json:"info,omitempty"` } type Solution struct { @@ -48,10 +49,13 @@ type Badge struct { type Product struct { Key string `json:"key"` Name string `json:"name"` + Fullname string `json:"fullname"` Tagline string `json:"tagline"` Summary string `json:"summary"` Published bool `json:"published"` + Author string `json:"author"` Website URLRef `json:"website"` + Keyword string `json:"keyword"` HeroImage Image `json:"heroImage"` Logo Image `json:"logo"` LogoWhite Image `json:"logoWhite"` diff --git a/vendor/modules.txt b/vendor/modules.txt index e902b46..216c528 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -39,7 +39,7 @@ github.com/alecthomas/chroma/styles # github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc github.com/appscode/go/log/golog github.com/appscode/go/runtime -# github.com/appscode/static-assets v0.3.1 +# github.com/appscode/static-assets v0.4.0 github.com/appscode/static-assets/api github.com/appscode/static-assets/hugo # github.com/chaseadamsio/goorgeous v1.1.0