Skip to content

Commit

Permalink
schema: use Go's embed package instead of esc
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Day <stephen.day@getcruise.com>
  • Loading branch information
stevvooe committed Dec 2, 2021
1 parent eacdcc1 commit 4533d3e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 1,686 deletions.
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ help:
@echo " * 'docs' - produce document in the $(OUTPUT_DIRNAME) directory"
@echo " * 'fmt' - format the json with indentation"
@echo " * 'validate-examples' - validate the examples in the specification markdown files"
@echo " * 'schema-fs' - regenerate the virtual schema http/FileSystem"
@echo " * 'check-license' - check license headers in source files"
@echo " * 'lint' - Execute the source code linter"
@echo " * 'test' - Execute the unit tests"
Expand Down Expand Up @@ -79,15 +78,9 @@ endif
header.html: .tool/genheader.go specs-go/version.go
go run .tool/genheader.go > $@

validate-examples: schema/fs.go
validate-examples: schema/schema.go
go test -run TestValidate ./schema

schema/fs.go: $(wildcard schema/*.json) schema/gen.go
cd schema && printf "%s\n\n%s\n" "$$(cat ../.header)" "$$(go generate)" > fs.go

schema-fs: schema/fs.go
@echo "generating schema fs"

check-license:
@echo "checking license headers"
@./.tool/check-license
Expand Down Expand Up @@ -117,9 +110,6 @@ install.tools: $(TOOLS:%=.install.%)
.install.lint:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest

.install.esc:
go get -u github.com/mjibson/esc

.install.gitvalidation:
go get -u github.com/vbatts/git-validation

Expand Down
6 changes: 1 addition & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
module github.com/opencontainers/image-spec

go 1.11
go 1.16

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golangci/golangci-lint v1.43.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/russross/blackfriday v1.6.0
github.com/stretchr/testify v1.7.0 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
github.com/xeipuuv/gojsonschema v1.2.0
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
1,283 changes: 0 additions & 1,283 deletions go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit 4533d3e

Please sign in to comment.