diff --git a/.ci/check_rare_string.sh b/.ci/check_rare_string.sh new file mode 100644 index 000000000..fa2555b20 --- /dev/null +++ b/.ci/check_rare_string.sh @@ -0,0 +1,54 @@ +#!/bin/bash + + + +function LOG_ERROR() +{ + local content=${1} + echo -e "\033[31m"${content}"\033[0m" +} + +function LOG_INFO() +{ + local content=${1} + echo -e "\033[32m"${content}"\033[0m" +} + +get_md5sum_cmd() { + local md5sum_cmd="md5sum" + if [ "$(uname)" == "Darwin" ]; then + md5sum_cmd="md5" + fi + echo "$md5sum_cmd" +} + +function checkConcatenatedRareString() { + + concatenatedString=${1} + log_file=${2} + md5sum_cmd=$(get_md5sum_cmd) + + md5_concatenatedString=$(echo -n "$concatenatedString" | $md5sum_cmd | awk '{print $1}') + + # compare rare string and stringFromGet + get_output=$(cat ${log_file}| grep "result=" | awk -F '[][]' '{print $4}' | awk NF | tail -n 1) + md5_stringFromGet=$(echo -n "$get_output" | $md5sum_cmd | awk '{print $1}') + if [ "$md5_concatenatedString" != "$md5_stringFromGet" ]; then + LOG_ERROR "error: check failed, the md5 values of rareString and stringFromGet are not equal, fail concatenatedString: ${concatenatedString}, get_output: ${get_output}" + exit 1 + else + LOG_INFO "check success, concatenatedString: ${concatenatedString}" + fi +} + +main() { + concatenatedString=${1} + log_file=${2} + LOG_INFO "check rare string start, concatenatedString: ${concatenatedString}" + + checkConcatenatedRareString ${concatenatedString} ${log_file} + LOG_INFO "check rare string finished!" +} + +main "$@" + diff --git a/.ci/ci_cross_all_check.sh b/.ci/ci_cross_all_check.sh index 937bdc7c9..1a8390345 100644 --- a/.ci/ci_cross_all_check.sh +++ b/.ci/ci_cross_all_check.sh @@ -2,7 +2,9 @@ set -e ROOT=$(pwd)/demo/ +CI_PWD=$(pwd) PLUGIN_BRANCH=master +final_rare_input="" LOG_INFO() { local content=${1} @@ -14,6 +16,14 @@ LOG_ERROR() { echo -e "\033[31m[ERROR] ${content}\033[0m" } +prepare_rare_string() { + final_rare_input=$(bash ${CI_PWD}/.ci/gen_rare_string.sh) +} + +check_rare_string() { + bash ${CI_PWD}/.ci/check_rare_string.sh ${final_rare_input} ${ROOT}/WeCross-Console/logs/debug.log +} + check_log() { cd ${ROOT} error_log=routers-payment/127.0.0.1-8250-25500/logs/error.log @@ -62,6 +72,8 @@ demo_test() { ensure_bcos_nodes_running + prepare_rare_string + cd WeCross-Console/ bash start.sh < : certain tag or branch to download e.g - bash $0 v1.3.1 + bash $0 v1.4.0 EOF exit 0 } diff --git a/scripts/download_plugin.sh b/scripts/download_plugin.sh index 75c0f2b39..e8d0319f0 100644 --- a/scripts/download_plugin.sh +++ b/scripts/download_plugin.sh @@ -50,10 +50,10 @@ Usage: : certain tag or branch to download e.g - bash $0 BCOS2 v1.3.1 - bash $0 BCOS3 v1.3.1 - bash $0 Fabric1 v1.3.1 - bash $0 Fabric2 v1.3.1 + bash $0 BCOS2 v1.4.0 + bash $0 BCOS3 v1.4.0 + bash $0 Fabric1 v1.4.0 + bash $0 Fabric2 v1.4.0 EOF exit 0 } diff --git a/scripts/download_wecross.sh b/scripts/download_wecross.sh index e91169c31..ffe1ac226 100755 --- a/scripts/download_wecross.sh +++ b/scripts/download_wecross.sh @@ -6,7 +6,7 @@ LANG=en_US.UTF-8 enable_build_from_resource=0 compatibility_version= -default_compatibility_version=v1.3.1 # update this every release +default_compatibility_version=v1.4.0 # update this every release deps_dir=$(pwd)'/WeCross/plugin/' pages_dir=$(pwd)'/WeCross/pages/' src_dir=$(pwd)'/src/' diff --git a/src/main/java/com/webank/wecross/common/WeCrossDefault.java b/src/main/java/com/webank/wecross/common/WeCrossDefault.java index d826fd5fb..ef69b6e0a 100644 --- a/src/main/java/com/webank/wecross/common/WeCrossDefault.java +++ b/src/main/java/com/webank/wecross/common/WeCrossDefault.java @@ -4,7 +4,7 @@ import java.util.List; public class WeCrossDefault { - public static final String VERSION = "v1.3.1"; + public static final String VERSION = "v1.4.0"; public static final String TEMPLATE_URL = "http://127.0.0.1:8080/";