Skip to content

Commit

Permalink
app/version: v1.0-dev (#3077)
Browse files Browse the repository at this point in the history
Instead of going with version v0.20, use v1.0.

category: misc
ticket: none
  • Loading branch information
gsora authored May 8, 2024
1 parent 3e41eba commit fa71cd7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
12 changes: 9 additions & 3 deletions app/peerinfo/peerinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,28 @@ func TestPeerInfo(t *testing.T) {
now := time.Now()
const gitCommit = "1234567"

// when a major release happens, charon will only be compatible with a single version
versions := version.Supported()
if len(versions) < 2 {
versions = append(versions, versions...)
}

nodes := []struct {
Version version.SemVer
LockHash []byte
Offset time.Duration
Ignore bool
}{
{
Version: version.Supported()[0],
Version: versions[0],
LockHash: []byte("abcdef"),
},
{
Version: version.Supported()[0],
Version: versions[0],
LockHash: []byte("abcdef"),
},
{
Version: version.Supported()[1],
Version: versions[1],
LockHash: []byte("000000"),
Offset: time.Minute,
},
Expand Down
6 changes: 2 additions & 4 deletions app/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

// version a string since it is overwritten at build-time with the git tag for official releases.
var version = "v0.20-dev"
var version = "v1.0-dev"

// Version is the branch version of the codebase.
// - Main branch: v0.X-dev
Expand All @@ -25,9 +25,7 @@ var Version, _ = Parse(version) // Error is caught in tests.
// Supported returns the supported minor versions in order of precedence.
func Supported() []SemVer {
return []SemVer{
// Current minor version always goes first.
{major: 0, minor: 20},
{major: 0, minor: 19},
{major: 1, minor: 0},
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ func TestSupportedAreminors(t *testing.T) {
}

func TestMultiSupported(t *testing.T) {
require.True(t, len(version.Supported()) > 1)
require.GreaterOrEqual(t, len(version.Supported()), 1)
}

0 comments on commit fa71cd7

Please sign in to comment.