Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
burrow
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hang Yu
burrow
Commits
3dd192e0
Commit
3dd192e0
authored
8 years ago
by
Silas Davis
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #240 from benjaminbollen/develop
version: correct develop to v0.12.0-rc3
parents
632b73c6
0c1a3736
No related branches found
Branches containing commit
Tags
v0.17.0
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
consensus/tendermint/version.go
+44
-3
44 additions, 3 deletions
consensus/tendermint/version.go
consensus/tendermint/version_test.go
+58
-0
58 additions, 0 deletions
consensus/tendermint/version_test.go
version/version.go
+3
-6
3 additions, 6 deletions
version/version.go
with
105 additions
and
9 deletions
consensus/tendermint/version.go
+
44
−
3
View file @
3dd192e0
...
...
@@ -17,6 +17,10 @@
package
tendermint
import
(
"strconv"
tendermint_version
"github.com/tendermint/tendermint/version"
version
"github.com/eris-ltd/eris-db/version"
)
...
...
@@ -24,14 +28,51 @@ const (
// Client identifier to advertise over the network
tendermintClientIdentifier
=
"tendermint"
// Major version component of the current release
tendermintVersionMajor
=
0
tendermintVersionMajor
Const
uint8
=
0
// Minor version component of the current release
tendermintVersionMinor
=
6
tendermintVersionMinor
Const
uint8
=
6
// Patch version component of the current release
tendermintVersionPatch
=
0
tendermintVersionPatchConst
uint8
=
0
)
var
(
tendermintVersionMajor
uint8
tendermintVersionMinor
uint8
tendermintVersionPatch
uint8
)
func
init
()
{
// discard error because we test for this in Continuous Integration tests
tendermintVersionMajor
,
_
=
getTendermintMajorVersionFromSource
()
tendermintVersionMinor
,
_
=
getTendermintMinorVersionFromSource
()
tendermintVersionPatch
,
_
=
getTendermintPatchVersionFromSource
()
}
func
GetTendermintVersion
()
*
version
.
VersionIdentifier
{
return
version
.
New
(
tendermintClientIdentifier
,
tendermintVersionMajor
,
tendermintVersionMinor
,
tendermintVersionPatch
)
}
func
getTendermintMajorVersionFromSource
()
(
uint8
,
error
)
{
majorVersionUint
,
err
:=
strconv
.
ParseUint
(
tendermint_version
.
Maj
,
10
,
8
)
if
err
!=
nil
{
return
tendermintVersionMajorConst
,
err
}
return
uint8
(
majorVersionUint
),
nil
}
func
getTendermintMinorVersionFromSource
()
(
uint8
,
error
)
{
minorVersionUint
,
err
:=
strconv
.
ParseUint
(
tendermint_version
.
Min
,
10
,
8
)
if
err
!=
nil
{
return
tendermintVersionMinorConst
,
err
}
return
uint8
(
minorVersionUint
),
nil
}
func
getTendermintPatchVersionFromSource
()
(
uint8
,
error
)
{
patchVersionUint
,
err
:=
strconv
.
ParseUint
(
tendermint_version
.
Fix
,
10
,
8
)
if
err
!=
nil
{
return
tendermintVersionPatchConst
,
err
}
return
uint8
(
patchVersionUint
),
nil
}
This diff is collapsed.
Click to expand it.
consensus/tendermint/version_test.go
0 → 100644
+
58
−
0
View file @
3dd192e0
// Copyright 2015, 2016 Eris Industries (UK) Ltd.
// This file is part of Eris-RT
// Eris-RT is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Eris-RT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Eris-RT. If not, see <http://www.gnu.org/licenses/>.
package
tendermint
import
(
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func
TestMinorVersionTendermintEqual
(
t
*
testing
.
T
)
{
// assert explicitly on major and minor version number
assert
.
Equal
(
t
,
tendermintVersionMajorConst
,
tendermintVersionMajor
,
fmt
.
Sprintf
(
"Major version number for Tendermint consensus is not %v as expected: %v"
,
tendermintVersionMajorConst
,
tendermintVersionMajor
))
assert
.
Equal
(
t
,
tendermintVersionMinorConst
,
tendermintVersionMinor
,
fmt
.
Sprintf
(
"Minor version number for Tendermint consensus is not %v as expected: %v"
,
tendermintVersionMinorConst
,
tendermintVersionMinor
))
// assert patch number can not regress
if
tendermintVersionPatchConst
>
tendermintVersionPatch
{
t
.
Errorf
(
"Patch version has regressed for Tendermint consensus: expected minimally %v, got %v"
,
tendermintVersionPatchConst
,
tendermintVersionPatch
)
t
.
Fail
()
}
}
func
TestSemanticVersioningTendermint
(
t
*
testing
.
T
)
{
// assert that reading the semantic version from Tendermint vendored source
// succeeds without error; at runtime initialisation, on error we default
// to hard-coded semantic version
if
_
,
err
:=
getTendermintMajorVersionFromSource
();
err
!=
nil
{
t
.
Errorf
(
"Failed to read Major version from Tendermint source code: %s"
,
err
)
t
.
Fail
()
}
if
_
,
err
:=
getTendermintMinorVersionFromSource
();
err
!=
nil
{
t
.
Errorf
(
"Failed to read Minor version from Tendermint source code: %s"
,
err
)
t
.
Fail
()
}
if
_
,
err
:=
getTendermintPatchVersionFromSource
();
err
!=
nil
{
t
.
Errorf
(
"Failed to read Patch version from Tendermint source code: %s"
,
err
)
t
.
Fail
()
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
version/version.go
+
3
−
6
View file @
3dd192e0
...
...
@@ -125,11 +125,8 @@ func (version *VersionIdentifier) MatchesMinorVersion(
}
//------------------------------------------------------------------------------
// Version number for DOCKER/build.sh
// NOTE [ben]: deprecate public const version string
const
TENDERMINT_VERSION
=
"0.5.0"
// Version number for tests/build_tool.sh
// IMPORTANT: Eris-DB version must be on the last line of this file for
// the deployment script
DOCKER
/build.sh to pick up the right label.
const
VERSION
=
"0.12.0-rc
2
"
// the deployment script
tests
/build
_tool
.sh to pick up the right label.
const
VERSION
=
"0.12.0-rc
3
"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment