mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 11:11:15 +02:00
Drop the leading 0 from the version number
Removes the leading 0 from the version number. The minor version, which we had been using as the major version, is now the major version. The revision, which we had been using as the minor version, is now the minor version. The revision number is dropped. The build number is promoted to being part of the version number. This also avoids issues where it was accidentally not included in the version number. The CLIENT_VERSION remains the same format as previous as previously, the Major version was 0 so that was never a factor in CLIENT_VERSION.
This commit is contained in:
@ -30,8 +30,7 @@ const std::string CLIENT_NAME("Satoshi");
|
||||
#define BUILD_DESC BUILD_GIT_TAG
|
||||
#define BUILD_SUFFIX ""
|
||||
#else
|
||||
#define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) \
|
||||
"." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD)
|
||||
#define BUILD_DESC "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_BUILD)
|
||||
#ifdef BUILD_GIT_COMMIT
|
||||
#define BUILD_SUFFIX "-" BUILD_GIT_COMMIT
|
||||
#elif defined(GIT_COMMIT_ID)
|
||||
@ -45,10 +44,7 @@ const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX);
|
||||
|
||||
static std::string FormatVersion(int nVersion)
|
||||
{
|
||||
if (nVersion % 100 == 0)
|
||||
return strprintf("%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100);
|
||||
else
|
||||
return strprintf("%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100);
|
||||
return strprintf("%d.%d.%d", nVersion / 10000, (nVersion / 100) % 100, nVersion % 100);
|
||||
}
|
||||
|
||||
std::string FormatFullVersion()
|
||||
|
Reference in New Issue
Block a user