Skip to content

Commit

Permalink
add upper version bound
Browse files Browse the repository at this point in the history
  • Loading branch information
3u13r committed Nov 13, 2023
1 parent 619f679 commit 3cab0ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/internal/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,10 @@ func (s *State) Constraints() []*validation.Constraint {
func (s *State) Migrate() error {
// In v2.13.0 the ClusterEndpoint and InClusterEndpoint fields were added.
// So they are expected to be empty when upgrading to this version.
if semver.Compare(constants.BinaryVersion().String(), "v2.13.0") != -1 {
// TODO(3u13r): Remove on main after v2.13.0 is released.
isUpgradeToV213 := semver.Compare(constants.BinaryVersion().String(), "v2.13.0") != -1 &&
semver.Compare(constants.BinaryVersion().String(), "v2.14.0") == -1
if isUpgradeToV213 {
if s.Infrastructure.InClusterEndpoint == "" {
s.Infrastructure.InClusterEndpoint = s.Infrastructure.ClusterEndpoint
}
Expand Down

0 comments on commit 3cab0ee

Please sign in to comment.