mirror of
https://github.com/containers/podman.git
synced 2025-07-14 18:21:12 +08:00
add version/rawversion package
To prevent the `semver` packages from bloating Quadlet. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -164,7 +164,7 @@ spelled with complete minutiae.
|
|||||||
`git checkout -b bump_vX.Y.Z`.
|
`git checkout -b bump_vX.Y.Z`.
|
||||||
1. Look up the *COMMIT ID* of the last release,
|
1. Look up the *COMMIT ID* of the last release,
|
||||||
`git log -1 $(git tag | sort -V | tail -1)`.
|
`git log -1 $(git tag | sort -V | tail -1)`.
|
||||||
1. Edit `version/version.go` and bump the `Version` value to the new
|
1. Edit `version/rawversion/version.go` and bump the `Version` value to the new
|
||||||
release version. If there were API changes, also bump `APIVersion` value.
|
release version. If there were API changes, also bump `APIVersion` value.
|
||||||
Make sure to also bump the version in the swagger.yaml `pkg/api/server/docs.go`
|
Make sure to also bump the version in the swagger.yaml `pkg/api/server/docs.go`
|
||||||
and to add a new entry in `docs/source/Reference.rst` for major and minor releases.
|
and to add a new entry in `docs/source/Reference.rst` for major and minor releases.
|
||||||
@ -181,7 +181,7 @@ spelled with complete minutiae.
|
|||||||
1. Tag the `Bump to vX.Y.Z` commit as a release by running
|
1. Tag the `Bump to vX.Y.Z` commit as a release by running
|
||||||
`git tag -s -m 'vX.Y.Z' vX.Y.Z $HASH` where `$HASH` is specified explicitly
|
`git tag -s -m 'vX.Y.Z' vX.Y.Z $HASH` where `$HASH` is specified explicitly
|
||||||
and carefully, to avoid (basically) unfixable accidents (if they are pushed).
|
and carefully, to avoid (basically) unfixable accidents (if they are pushed).
|
||||||
1. Change `version/version.go` again. This time, bump the **patch** version and
|
1. Change `version/rawversion/version.go` again. This time, bump the **patch** version and
|
||||||
re-add the `-dev` suffix to indicate this is a non-released version of Podman.
|
re-add the `-dev` suffix to indicate this is a non-released version of Podman.
|
||||||
1. Change `contrib/spec/podman.spec.in`, bumping **patch** number of `Version`.
|
1. Change `contrib/spec/podman.spec.in`, bumping **patch** number of `Version`.
|
||||||
1. Commit these changes with the message `Bump to X.Y.Z-dev`.
|
1. Commit these changes with the message `Bump to X.Y.Z-dev`.
|
||||||
|
10
version/rawversion/version.go
Normal file
10
version/rawversion/version.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package rawversion
|
||||||
|
|
||||||
|
// RawVersion is the raw version string.
|
||||||
|
//
|
||||||
|
// This indirection is needed to prevent semver packages from bloating
|
||||||
|
// Quadlet's binary size.
|
||||||
|
//
|
||||||
|
// NOTE: remember to bump the version at the top of the top-level README.md
|
||||||
|
// file when this is bumped.
|
||||||
|
const RawVersion = "4.5.0-dev"
|
@ -2,6 +2,7 @@ package version
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/blang/semver/v4"
|
"github.com/blang/semver/v4"
|
||||||
|
"github.com/containers/podman/v4/version/rawversion"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@ -27,7 +28,7 @@ const (
|
|||||||
// NOTE: remember to bump the version at the top
|
// NOTE: remember to bump the version at the top
|
||||||
// of the top-level README.md file when this is
|
// of the top-level README.md file when this is
|
||||||
// bumped.
|
// bumped.
|
||||||
var Version = semver.MustParse("4.5.0-dev")
|
var Version = semver.MustParse(rawversion.RawVersion)
|
||||||
|
|
||||||
// See https://docs.docker.com/engine/api/v1.40/
|
// See https://docs.docker.com/engine/api/v1.40/
|
||||||
// libpod compat handlers are expected to honor docker API versions
|
// libpod compat handlers are expected to honor docker API versions
|
||||||
|
Reference in New Issue
Block a user