Skip to content

Commit

Permalink
Merge pull request #885 from stevvooe/use-embed
Browse files Browse the repository at this point in the history
schema: use Go's embed package instead of esc
  • Loading branch information
vbatts authored Mar 3, 2022
2 parents 9716dee + 4533d3e commit 8205360
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 8205360

Please sign in to comment.