Merge pull request #874 from dnephin/replace-go-bindata

Replace go-bindata with esc
This commit is contained in:
Brian Goff 2018-02-20 17:00:22 -05:00 committed by GitHub
commit 5730ef8ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 435 additions and 333 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
package schema package schema
//go:generate go-bindata -pkg schema -nometadata data //go:generate esc -o bindata.go -pkg schema -private -modtime=1518458244 data
import ( import (
"fmt" "fmt"
@ -56,7 +56,7 @@ func normalizeVersion(version string) string {
// Validate uses the jsonschema to validate the configuration // Validate uses the jsonschema to validate the configuration
func Validate(config map[string]interface{}, version string) error { func Validate(config map[string]interface{}, version string) error {
schemaData, err := Asset(fmt.Sprintf("data/config_schema_v%s.json", version)) schemaData, err := _escFSByte(false, fmt.Sprintf("/data/config_schema_v%s.json", version))
if err != nil { if err != nil {
return errors.Errorf("unsupported Compose file version: %s", version) return errors.Errorf("unsupported Compose file version: %s", version)
} }

View File

@ -10,11 +10,11 @@ RUN go get -d github.com/LK4D4/vndr && \
go build -v -o /usr/bin/vndr . && \ go build -v -o /usr/bin/vndr . && \
rm -rf /go/src/* /go/pkg/* /go/bin/* rm -rf /go/src/* /go/pkg/* /go/bin/*
ARG BINDATA_SHA=a0ff2567cfb70903282db057e799fd826784d41d ARG ESC_SHA=58d9cde84f237ecdd89bd7f61c2de2853f4c5c6e
RUN go get -d github.com/jteeuwen/go-bindata/go-bindata && \ RUN go get -d github.com/mjibson/esc && \
cd /go/src/github.com/jteeuwen/go-bindata/go-bindata && \ cd /go/src/github.com/mjibson/esc && \
git checkout -q "$BINDATA_SHA" && \ git checkout -q "$ESC_SHA" && \
go build -v -o /usr/bin/go-bindata . && \ go build -v -o /usr/bin/esc . && \
rm -rf /go/src/* /go/pkg/* /go/bin/* rm -rf /go/src/* /go/pkg/* /go/bin/*
ARG FILEWATCHER_SHA=2e12ea42f6c8c089b19e992145bb94e8adaecedb ARG FILEWATCHER_SHA=2e12ea42f6c8c089b19e992145bb94e8adaecedb