Skip to content

Commit

Permalink
Merge pull request #162
Browse files Browse the repository at this point in the history
3154ea6 Bump version to 0.0.10.0-rc1 (dexX7)
  • Loading branch information
dexX7 committed Nov 4, 2015
2 parents 4b5799a + 3154ea6 commit c69245b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 12 deletions.
11 changes: 7 additions & 4 deletions configure.ac
Expand Up @@ -4,13 +4,14 @@ define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 10)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015)
define(_OMNICORE_VERSION_MILESTONE, 0)
define(_OMNICORE_VERSION_MAJOR, 0)
define(_OMNICORE_VERSION_MINOR, 9)
define(_OMNICORE_VERSION_PATCH, 99)
define(_OMNICORE_VERSION_STATUS, dev)
define(_OMNICORE_VERSION_MINOR, 10)
define(_OMNICORE_VERSION_PATCH, 0)
define(_OMNICORE_VERSION_BUILD, 0)
define(_OMNICORE_VERSION_STATUS, rc1)
AC_INIT([Omni Core],[_OMNICORE_VERSION_MILESTONE._OMNICORE_VERSION_MAJOR._OMNICORE_VERSION_MINOR._OMNICORE_VERSION_PATCH-_OMNICORE_VERSION_STATUS],[https://github.com/OmniLayer/omnicore/issues],[omnicore],[http://www.omnilayer.org/])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
Expand Down Expand Up @@ -902,11 +903,13 @@ AC_DEFINE(OMNICORE_VERSION_MILESTONE, _OMNICORE_VERSION_MILESTONE, [Omni Core mi
AC_DEFINE(OMNICORE_VERSION_MAJOR, _OMNICORE_VERSION_MAJOR, [Omni Core major version])
AC_DEFINE(OMNICORE_VERSION_MINOR, _OMNICORE_VERSION_MINOR, [Omni Core minor version])
AC_DEFINE(OMNICORE_VERSION_PATCH, _OMNICORE_VERSION_PATCH, [Omni Core patch version])
AC_DEFINE(OMNICORE_VERSION_BUILD, _OMNICORE_VERSION_BUILD, [Omni Core build number])
AC_DEFINE(OMNICORE_VERSION_STATUS, _OMNICORE_VERSION_STATUS, [Omni Core release status])
AC_SUBST(OMNICORE_VERSION_MILESTONE, _OMNICORE_VERSION_MILESTONE)
AC_SUBST(OMNICORE_VERSION_MAJOR, _OMNICORE_VERSION_MAJOR)
AC_SUBST(OMNICORE_VERSION_MINOR, _OMNICORE_VERSION_MINOR)
AC_SUBST(OMNICORE_VERSION_PATCH, _OMNICORE_VERSION_PATCH)
AC_SUBST(OMNICORE_VERSION_BUILD, _OMNICORE_VERSION_BUILD)
AC_SUBST(OMNICORE_VERSION_STATUS, _OMNICORE_VERSION_STATUS)

AC_SUBST(RELDFLAGS)
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.omnitest.include
Expand Up @@ -33,7 +33,8 @@ OMNICORE_TEST_CPP = \
omnicore/test/swapbyteorder_tests.cpp \
omnicore/test/tally_tests.cpp \
omnicore/test/uint256_extensions_tests.cpp \
omnicore/test/utils_tx.cpp
omnicore/test/utils_tx.cpp \
omnicore/test/version_tests.cpp

BITCOIN_TESTS += \
$(OMNICORE_TEST_CPP) \
Expand Down
40 changes: 40 additions & 0 deletions src/omnicore/test/version_tests.cpp
@@ -0,0 +1,40 @@
#include "omnicore/version.h"

#include "config/bitcoin-config.h"

#include <string>

#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_SUITE(omnicore_version_tests)

BOOST_AUTO_TEST_CASE(version_comparison)
{
BOOST_CHECK(OMNICORE_VERSION > 900300); // Master Core v0.0.9.3
}

/**
* The following tests are very unhandy, because any version bump
* breaks the tests.
*
* TODO: might be removed completely.
*/

BOOST_AUTO_TEST_CASE(version_string)
{
BOOST_CHECK_EQUAL(OmniCoreVersion(), "0.0.10-rc1");
}

BOOST_AUTO_TEST_CASE(version_number)
{
BOOST_CHECK_EQUAL(OMNICORE_VERSION, 1000000);
}

BOOST_AUTO_TEST_CASE(config_package_version)
{
// the package version is used in the file names:
BOOST_CHECK_EQUAL(PACKAGE_VERSION, "0.0.10.0-rc1");
}


BOOST_AUTO_TEST_SUITE_END()
18 changes: 11 additions & 7 deletions src/omnicore/version.h
Expand Up @@ -18,13 +18,16 @@
#define OMNICORE_VERSION_MAJOR 0

// Increase with every non-consensus affecting feature
#define OMNICORE_VERSION_MINOR 9
#define OMNICORE_VERSION_MINOR 10

// Increase with every patch, which is not a feature or consensus affecting
#define OMNICORE_VERSION_PATCH 99
#define OMNICORE_VERSION_PATCH 0

// Non-public build number/revision (usually zero)
#define OMNICORE_VERSION_BUILD 0

// Use "dev" for development versions, switch to "rc" for release candidates
#define OMNICORE_VERSION_STATUS dev
#define OMNICORE_VERSION_STATUS rc1


#endif // HAVE_CONFIG_H
Expand All @@ -41,10 +44,11 @@

//! Omni Core client version
static const int OMNICORE_VERSION =
+ 100000000 * OMNICORE_VERSION_MILESTONE
+ 100000 * OMNICORE_VERSION_MAJOR
+ 100 * OMNICORE_VERSION_MINOR
+ 1 * OMNICORE_VERSION_PATCH;
+100000000000 * OMNICORE_VERSION_MILESTONE
+ 100000000 * OMNICORE_VERSION_MAJOR
+ 100000 * OMNICORE_VERSION_MINOR
+ 100 * OMNICORE_VERSION_PATCH
+ 1 * OMNICORE_VERSION_BUILD;

//! Returns formatted Omni Core version, e.g. "0.0.9.1-dev"
const std::string OmniCoreVersion();
Expand Down

0 comments on commit c69245b

Please sign in to comment.