Merge pull request #1073 from ethereum/develop

Release merge for 0.4.1
This commit is contained in:
chriseth 2016-09-09 12:23:50 +02:00 committed by GitHub
commit 4fc6fc2ca5
8 changed files with 14 additions and 12 deletions

View File

@ -8,7 +8,7 @@ include(EthPolicy)
eth_policy() eth_policy()
# project name and version should be set after cmake_policy CMP0048 # project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.4.0") set(PROJECT_VERSION "0.4.1")
project(solidity VERSION ${PROJECT_VERSION}) project(solidity VERSION ${PROJECT_VERSION})
# Let's find our dependencies # Let's find our dependencies

View File

@ -48,7 +48,7 @@ if (SOL_COMMIT_HASH)
endif() endif()
if (SOL_COMMIT_HASH AND SOL_LOCAL_CHANGES) if (SOL_COMMIT_HASH AND SOL_LOCAL_CHANGES)
set(SOL_COMMIT_HASH "${SOL_COMMIT_HASH}-mod") set(SOL_COMMIT_HASH "${SOL_COMMIT_HASH}.mod")
endif() endif()
if (NOT SOL_COMMIT_HASH) if (NOT SOL_COMMIT_HASH)

View File

@ -58,12 +58,14 @@ bytes dev::solidity::binaryVersion()
solAssert(i < VersionString.size() && VersionString[i] == '.', ""); solAssert(i < VersionString.size() && VersionString[i] == '.', "");
++i; ++i;
ret.push_back(byte(parseDecimal())); ret.push_back(byte(parseDecimal()));
solAssert(i < VersionString.size() && VersionString[i] == '-', ""); solAssert(i < VersionString.size() && (VersionString[i] == '-' || VersionString[i] == '+'), "");
++i; ++i;
size_t commitpos = VersionString.find("commit.");
solAssert(commitpos != string::npos, "");
i = commitpos + 7;
solAssert(i + 7 < VersionString.size(), ""); solAssert(i + 7 < VersionString.size(), "");
bytes commitHash = fromHex(VersionString.substr(i, 8)); bytes commitHash = fromHex(VersionString.substr(i, 8));
if (commitHash.empty()) solAssert(!commitHash.empty(), "");
commitHash = bytes(4, 0);
ret += commitHash; ret += commitHash;
solAssert(ret.size() == 1 + 3 + 4, ""); solAssert(ret.size() == 1 + 3 + 4, "");

View File

@ -34,7 +34,7 @@ VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_
test -n "$VER" test -n "$VER"
VER="v$VER" VER="v$VER"
COMMIT=$(git rev-parse --short HEAD) COMMIT=$(git rev-parse --short HEAD)
DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%F) DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%m.%d)
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
@ -52,14 +52,14 @@ git config user.email "chris@ethereum.org"
git checkout -B gh-pages origin/gh-pages git checkout -B gh-pages origin/gh-pages
git clean -f -d -x git clean -f -d -x
# We only want one release per day and we do not want to push the same commit twice. # We only want one release per day and we do not want to push the same commit twice.
if ls ./bin/soljson-"$VER-$DATE"-*.js || ls ./bin/soljson-*-"$COMMIT.js" if ls ./bin/soljson-"$VER-nightly.$DATE"-*.js || ls ./bin/soljson-*"commit.$COMMIT.js"
then then
echo "Not publishing, we already published this version today." echo "Not publishing, we already published this version today."
exit 0 exit 0
fi fi
# This file is assumed to be the product of the build_emscripten.sh script. # This file is assumed to be the product of the build_emscripten.sh script.
cp ../soljson.js ./bin/"soljson-$VER-$DATE-$COMMIT.js" cp ../soljson.js ./bin/"soljson-$VER-nightly.$DATE+commit.$COMMIT.js"
node ./update node ./update
cd bin cd bin
LATEST=$(ls -r soljson-v* | head -n 1) LATEST=$(ls -r soljson-v* | head -n 1)

View File

@ -39,7 +39,7 @@ namespace
{ {
static char const* registrarCode = R"DELIMITER( static char const* registrarCode = R"DELIMITER(
pragma solidity ^0.3.5; pragma solidity ^0.4.0;
contract NameRegister { contract NameRegister {
function addr(string _name) constant returns (address o_owner); function addr(string _name) constant returns (address o_owner);

View File

@ -52,7 +52,7 @@ static char const* registrarCode = R"DELIMITER(
// @authors: // @authors:
// Gav Wood <g@ethdev.com> // Gav Wood <g@ethdev.com>
pragma solidity ^0.3.5; pragma solidity ^0.4.0;
contract Registrar { contract Registrar {
event Changed(string indexed name); event Changed(string indexed name);

View File

@ -55,7 +55,7 @@ static char const* walletCode = R"DELIMITER(
// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the // some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the
// interior is executed. // interior is executed.
pragma solidity ^0.3.5; pragma solidity ^0.4.0;
contract multiowned { contract multiowned {

View File

@ -5961,7 +5961,7 @@ BOOST_AUTO_TEST_CASE(version_stamp_for_libraries)
bytes runtimeCode = compileAndRun(sourceCode, 0, "lib"); bytes runtimeCode = compileAndRun(sourceCode, 0, "lib");
BOOST_CHECK(runtimeCode.size() >= 8); BOOST_CHECK(runtimeCode.size() >= 8);
BOOST_CHECK_EQUAL(runtimeCode[0], int(Instruction::PUSH6)); // might change once we switch to 1.x.x BOOST_CHECK_EQUAL(runtimeCode[0], int(Instruction::PUSH6)); // might change once we switch to 1.x.x
BOOST_CHECK_EQUAL(runtimeCode[1], 3); // might change once we switch away from x.3.x BOOST_CHECK_EQUAL(runtimeCode[1], 4); // might change once we switch away from x.4.x
BOOST_CHECK_EQUAL(runtimeCode[7], int(Instruction::POP)); BOOST_CHECK_EQUAL(runtimeCode[7], int(Instruction::POP));
} }