mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1573 from ethereum/metadata-version
Store strict version number in metadata (exclude the platform)
This commit is contained in:
commit
4f4963131b
@ -2,6 +2,7 @@
|
||||
|
||||
Features:
|
||||
* AST: Use deterministic node identifiers.
|
||||
* Metadata: Do not include platform in the version number.
|
||||
|
||||
### 0.4.8 (2017-01-13)
|
||||
|
||||
|
@ -60,6 +60,8 @@ if (SOL_COMMIT_HASH AND SOL_LOCAL_CHANGES)
|
||||
set(SOL_COMMIT_HASH "${SOL_COMMIT_HASH}.mod")
|
||||
endif()
|
||||
|
||||
set(SOL_VERSION_COMMIT "commit.${SOL_COMMIT_HASH}")
|
||||
set(SOl_VERSION_PLATFORM ETH_BUILD_PLATFORM)
|
||||
set(SOL_VERSION_BUILDINFO "commit.${SOL_COMMIT_HASH}.${ETH_BUILD_PLATFORM}")
|
||||
|
||||
set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp")
|
||||
|
@ -8,3 +8,5 @@
|
||||
#define ETH_BUILD_PLATFORM "@ETH_BUILD_PLATFORM@"
|
||||
#define SOL_VERSION_PRERELEASE "@SOL_VERSION_PRERELEASE@"
|
||||
#define SOL_VERSION_BUILDINFO "@SOL_VERSION_BUILDINFO@"
|
||||
#define SOL_VERSION_COMMIT "@SOL_VERSION_COMMIT@"
|
||||
#define SOL_VERSION_PLATFORM "@SOL_VERSION_PLATFORM@"
|
||||
|
@ -695,7 +695,7 @@ string CompilerStack::createOnChainMetadata(Contract const& _contract) const
|
||||
Json::Value meta;
|
||||
meta["version"] = 1;
|
||||
meta["language"] = "Solidity";
|
||||
meta["compiler"]["version"] = VersionString;
|
||||
meta["compiler"]["version"] = VersionStringStrict;
|
||||
|
||||
meta["sources"] = Json::objectValue;
|
||||
for (auto const& s: m_sources)
|
||||
|
@ -38,6 +38,10 @@ string const dev::solidity::VersionString =
|
||||
(string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE)) +
|
||||
(string(SOL_VERSION_BUILDINFO).empty() ? "" : "+" + string(SOL_VERSION_BUILDINFO));
|
||||
|
||||
string const dev::solidity::VersionStringStrict =
|
||||
string(dev::solidity::VersionNumber) +
|
||||
(string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE)) +
|
||||
(string(SOL_VERSION_COMMIT).empty() ? "" : "+" + string(SOL_VERSION_COMMIT));
|
||||
|
||||
bytes dev::solidity::binaryVersion()
|
||||
{
|
||||
|
@ -32,6 +32,7 @@ namespace solidity
|
||||
|
||||
extern char const* VersionNumber;
|
||||
extern std::string const VersionString;
|
||||
extern std::string const VersionStringStrict;
|
||||
|
||||
/// @returns a binary form of the version string, where A.B.C-HASH is encoded such that
|
||||
/// the first byte is zero, the following three bytes encode A B and C (interpreted as decimals)
|
||||
|
Loading…
Reference in New Issue
Block a user