aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-30 18:26:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-07-01 18:22:54 +0800
commitb0e4555db37006f1a72c4dd793aef6d69f70f4df (patch)
tree8fd0a11f19723f120b4734733b4215e7167fae7b
parentb3be9d6fdc195519eccce22f07af5ee42af399ed (diff)
downloaddexon-solidity-b0e4555db37006f1a72c4dd793aef6d69f70f4df.tar.gz
dexon-solidity-b0e4555db37006f1a72c4dd793aef6d69f70f4df.tar.zst
dexon-solidity-b0e4555db37006f1a72c4dd793aef6d69f70f4df.zip
Read version from CMakeLists in test_emscripten
-rwxr-xr-xscripts/test_emscripten.sh15
1 files changed, 1 insertions, 14 deletions
diff --git a/scripts/test_emscripten.sh b/scripts/test_emscripten.sh
index 3bb16aa4..aa93ed94 100755
--- a/scripts/test_emscripten.sh
+++ b/scripts/test_emscripten.sh
@@ -45,20 +45,7 @@ rm -f soljson.js
cp ../solc/soljson.js soljson.js
# Update version (needed for some tests)
-echo "Creating version.c"
-rm -f version version.c
-cat <<EOF > version.c
-#include <stdio.h>
-#include "../include/solidity/BuildInfo.h"
-int main(int argc, char **argv) {
- printf(ETH_PROJECT_VERSION);
- return 0;
-}
-EOF
-echo "Compiling version.c"
-gcc -o version version.c
-echo "Running version"
-VERSION=`./version`
+VERSION=$(grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? $(dirname "$0")/../CMakeLists.txt)
echo "Updating package.json to version $VERSION"
npm version $VERSION