Skip to content

Commit 2df0dcf

Browse files
Change storage and common version files to emulate image's
Change the version file for c/common and c/storage to emulate the version file that is in c/image. This updates version/version.go in c/common, and moves the VERSION file in c/storage to version/version.go. Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
1 parent 9ed9aca commit 2df0dcf

4 files changed

Lines changed: 36 additions & 6 deletions

File tree

common/version/version.go

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
package version
22

3-
// Version is the version of the build.
4-
const Version = "0.69.0-dev"
3+
import "fmt"
4+
5+
const (
6+
// VersionMajor is for an API incompatible changes
7+
VersionMajor = 0
8+
// VersionMinor is for functionality in a backwards-compatible manner
9+
VersionMinor = 69
10+
// VersionPatch is for backwards-compatible bug fixes
11+
VersionPatch = 0
12+
13+
// VersionDev indicates development branch. Releases will be empty string.
14+
VersionDev = "-dev"
15+
)
16+
17+
// Version is the specification version that the package types support.
18+
var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev)

storage/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

storage/store.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package storage
22

33
import (
4-
_ "embed"
54
"encoding/base64"
65
"errors"
76
"fmt"
@@ -35,6 +34,7 @@ import (
3534
"go.podman.io/storage/pkg/stringutils"
3635
"go.podman.io/storage/pkg/system"
3736
"go.podman.io/storage/types"
37+
"go.podman.io/storage/version"
3838
)
3939

4040
type updateNameOperation int
@@ -2960,8 +2960,7 @@ func (s *store) Status() ([][2]string, error) {
29602960
return rlstore.Status()
29612961
}
29622962

2963-
//go:embed VERSION
2964-
var storageVersion string
2963+
var storageVersion = version.Version
29652964

29662965
func (s *store) Version() ([][2]string, error) {
29672966
if trimmedVersion := strings.TrimSpace(storageVersion); trimmedVersion != "" {

storage/version/version.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package version
2+
3+
import "fmt"
4+
5+
const (
6+
// VersionMajor is for an API incompatible changes
7+
VersionMajor = 1
8+
// VersionMinor is for functionality in a backwards-compatible manner
9+
VersionMinor = 64
10+
// VersionPatch is for backwards-compatible bug fixes
11+
VersionPatch = 0
12+
13+
// VersionDev indicates development branch. Releases will be empty string.
14+
VersionDev = "-dev"
15+
)
16+
17+
// Version is the specification version that the package types support.
18+
var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev)

0 commit comments

Comments
 (0)