Skip to content

Commit

Permalink
also execute for pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
3u13r committed Nov 13, 2023
1 parent 037dcc5 commit 4db69fc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/internal/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
"github.com/edgelesssys/constellation/v2/internal/constants"
"github.com/edgelesssys/constellation/v2/internal/file"
"github.com/edgelesssys/constellation/v2/internal/semver"
"github.com/edgelesssys/constellation/v2/internal/validation"
"golang.org/x/mod/semver"
)

const (
Expand Down Expand Up @@ -564,9 +564,7 @@ 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.
// 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 constants.BinaryVersion().MajorMinorEqual(semver.NewFromInt(2, 13, 0, "")) {
if s.Infrastructure.InClusterEndpoint == "" {
s.Infrastructure.InClusterEndpoint = s.Infrastructure.ClusterEndpoint
}
Expand Down

0 comments on commit 4db69fc

Please sign in to comment.