diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-27 18:39:48 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-29 00:58:08 +0800 |
commit | cc4f2500fb1b8313ebfcb6e4d28c3adb3cd0a470 (patch) | |
tree | b71a707ed40f1f19ad52aa176ffde1253c3dd3b9 /scripts | |
parent | 913b9c0e6b0c58a1983f676f8c73e4f6581a3e68 (diff) | |
download | dexon-solidity-cc4f2500fb1b8313ebfcb6e4d28c3adb3cd0a470.tar.gz dexon-solidity-cc4f2500fb1b8313ebfcb6e4d28c3adb3cd0a470.tar.zst dexon-solidity-cc4f2500fb1b8313ebfcb6e4d28c3adb3cd0a470.zip |
Use BuildInfo.h to retrieve version
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test_emscripten.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/test_emscripten.sh b/scripts/test_emscripten.sh index df1ebaee..3bb16aa4 100755 --- a/scripts/test_emscripten.sh +++ b/scripts/test_emscripten.sh @@ -45,7 +45,20 @@ rm -f soljson.js cp ../solc/soljson.js soljson.js # Update version (needed for some tests) -VERSION=`$REPO_ROOT/build/solc/solc --version | sed -ne "s/^Version: \([0-9]*.[0-9]*.[0-9]*\).*/\1/p"` +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` echo "Updating package.json to version $VERSION" npm version $VERSION |