Skip to content

Commit

Permalink
Merge pull request opencontainers#121 from q384566678/bump-version
Browse files Browse the repository at this point in the history
Update version
  • Loading branch information
coolljt0725 authored Mar 8, 2017
2 parents c94278c + 5e2f789 commit 374a7f6
Show file tree
Hide file tree
Showing 20 changed files with 9,586 additions and 148 deletions.
10 changes: 5 additions & 5 deletions cmd/oci-image-validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var validateTypes = []string{
image.TypeImageLayout,
image.TypeImage,
image.TypeManifest,
image.TypeManifestList,
image.TypeImageIndex,
image.TypeConfig,
}

Expand Down Expand Up @@ -181,11 +181,11 @@ func (v *validateCmd) validatePath(name string) error {

switch typ {
case image.TypeManifest:
return schema.MediaTypeManifest.Validate(f)
case image.TypeManifestList:
return schema.MediaTypeManifestList.Validate(f)
return schema.ValidatorMediaTypeManifest.Validate(f)
case image.TypeImageIndex:
return schema.ValidatorMediaTypeImageIndex.Validate(f)
case image.TypeConfig:
return schema.MediaTypeImageConfig.Validate(f)
return schema.ValidatorMediaTypeImageConfig.Validate(f)
}

return fmt.Errorf("type %q unimplemented", typ)
Expand Down
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import:
- package: github.com/opencontainers/go-digest
version: v1.0.0-rc0
- package: github.com/opencontainers/image-spec
version: v1.0.0-rc4
version: v1.0.0-rc5
subpackages:
- schema
- specs-go/v1
- package: github.com/opencontainers/runtime-spec
version: v1.0.0-rc3
version: v1.0.0-rc4
subpackages:
- specs-go
- package: github.com/pkg/errors
Expand Down
16 changes: 8 additions & 8 deletions image/autodetect.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (

// supported autodetection types
const (
TypeImageLayout = "imageLayout"
TypeImage = "image"
TypeManifest = "manifest"
TypeManifestList = "manifestList"
TypeConfig = "config"
TypeImageLayout = "imageLayout"
TypeImage = "image"
TypeManifest = "manifest"
TypeImageIndex = "imageIndex"
TypeConfig = "config"
)

// Autodetect detects the validation type for the given path
Expand Down Expand Up @@ -94,11 +94,11 @@ func Autodetect(path string) (string, error) {
}

switch {
case header.MediaType == string(schema.MediaTypeManifest):
case header.MediaType == string(schema.ValidatorMediaTypeManifest):
return TypeManifest, nil

case header.MediaType == string(schema.MediaTypeManifestList):
return TypeManifestList, nil
case header.MediaType == string(schema.ValidatorMediaTypeImageIndex):
return TypeImageIndex, nil

case header.MediaType == "" && header.SchemaVersion == 0 && header.Config != nil:
// config files don't have mediaType/schemaVersion header
Expand Down
2 changes: 1 addition & 1 deletion image/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func findConfig(w walker, d *descriptor) (*config, error) {
return errors.Wrapf(err, "%s: error reading config", path)
}

if err := schema.MediaTypeImageConfig.Validate(bytes.NewReader(buf)); err != nil {
if err := schema.ValidatorMediaTypeImageConfig.Validate(bytes.NewReader(buf)); err != nil {
return errors.Wrapf(err, "%s: config validation failed", path)
}

Expand Down
2 changes: 1 addition & 1 deletion image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Validate(tarFile string, refs []string, out *log.Logger) error {

var validRefMediaTypes = []string{
v1.MediaTypeImageManifest,
v1.MediaTypeImageManifestList,
v1.MediaTypeImageIndex,
}

func validate(w walker, refs []string, out *log.Logger) error {
Expand Down
2 changes: 1 addition & 1 deletion image/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func findManifest(w walker, d *descriptor) (*manifest, error) {
return errors.Wrapf(err, "%s: error reading manifest", path)
}

if err := schema.MediaTypeManifest.Validate(bytes.NewReader(buf)); err != nil {
if err := schema.ValidatorMediaTypeManifest.Validate(bytes.NewReader(buf)); err != nil {
return errors.Wrapf(err, "%s: manifest validation failed", path)
}

Expand Down
9,598 changes: 9,517 additions & 81 deletions vendor/github.com/opencontainers/image-spec/schema/fs.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/github.com/opencontainers/image-spec/schema/gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions vendor/github.com/opencontainers/image-spec/schema/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions vendor/github.com/opencontainers/runtime-spec/specs-go/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 374a7f6

Please sign in to comment.