Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump dummy version #122

Merged
merged 1 commit into from
Feb 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/oci-create-runtime-bundle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

specs "github.com/opencontainers/image-spec/specs-go"
"github.com/opencontainers/image-tools/image"
"github.com/opencontainers/image-tools/version"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -107,6 +108,7 @@ It is strongly recommended to keep the default value.`,
func (v *bundleCmd) Run(cmd *cobra.Command, args []string) {
if v.version {
v.stdout.Printf("commit: %s", gitCommit)
v.stdout.Printf("version: %s", version.Version)
v.stdout.Printf("spec: %s", specs.Version)
os.Exit(0)

Expand Down
2 changes: 2 additions & 0 deletions cmd/oci-image-validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/opencontainers/image-spec/schema"
specs "github.com/opencontainers/image-spec/specs-go"
"github.com/opencontainers/image-tools/image"
"github.com/opencontainers/image-tools/version"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -104,6 +105,7 @@ func newValidateCmd(stdout, stderr *log.Logger) *cobra.Command {
func (v *validateCmd) Run(cmd *cobra.Command, args []string) {
if v.version {
v.stdout.Printf("commit: %s", gitCommit)
v.stdout.Printf("version: %s", version.Version)
v.stdout.Printf("spec: %s", specs.Version)
os.Exit(0)
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/oci-unpack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

specs "github.com/opencontainers/image-spec/specs-go"
"github.com/opencontainers/image-tools/image"
"github.com/opencontainers/image-tools/version"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -100,6 +101,7 @@ func newUnpackCmd(stdout, stderr *log.Logger) *cobra.Command {
func (v *unpackCmd) Run(cmd *cobra.Command, args []string) {
if v.version {
v.stdout.Printf("commit: %s", gitCommit)
v.stdout.Printf("version: %s", version.Version)
v.stdout.Printf("spec: %s", specs.Version)
os.Exit(0)
}
Expand Down
32 changes: 32 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright 2016 The Linux Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package version

import "fmt"

const (
// VersionMajor is for an API incompatible changes
VersionMajor = 0
// VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 0
// VersionPatch is for backwards-compatible bug fixes
VersionPatch = 0

// VersionDev indicates development branch. Releases will be empty string.
VersionDev = "-dev"
)

// Version is the specification version that the package types support.
var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev)