Skip to content

Commit

Permalink
Release 1.0.5
Browse files Browse the repository at this point in the history
Release 1.0.5
  • Loading branch information
JimmyShi22 authored Sep 19, 2019
2 parents 43489dd + f6a6f55 commit 0af25cf
Show file tree
Hide file tree
Showing 25 changed files with 600 additions and 365 deletions.
15 changes: 15 additions & 0 deletions .ci/ci_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -e

curl -LO https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/dev/tools/build_chain.sh && chmod u+x build_chain.sh
bash <(curl -s https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/master/tools/ci/download_bin.sh) -b dev
echo "127.0.0.1:4 agency1 1,2,3" > ipconf
./build_chain.sh -e bin/fisco-bcos -f ipconf -p 30300,20200,8545 -v 2.0.0
./nodes/127.0.0.1/fisco-bcos -v
./nodes/127.0.0.1/start_all.sh
cp nodes/127.0.0.1/sdk/* src/main/resources/
mv src/main/resources/applicationContext-sample.xml src/main/resources/applicationContext.xml
./gradlew verifyGoogleJavaFormat
./gradlew build
./gradlew test
68 changes: 68 additions & 0 deletions .ci/ci_check_commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash

set -e

scan_code_script="python ~/cobra/cobra.py -t "
ignore_files=(.ci)

LOG_ERROR() {
content=${1}
echo -e "\033[31m${content}\033[0m"
}

LOG_INFO() {
content=${1}
echo -e "\033[32m${content}\033[0m"
}

execute_cmd() {
command="${1}"
eval ${command}
ret=$?
if [ $ret -ne 0 ];then
LOG_ERROR "FAILED of command: ${command}"
exit 1
else
LOG_INFO "SUCCESS of command: ${command}"
fi
}

should_ignore()
{
local file=${1}
for ignore in ${ignore_files[*]}; do
if echo ${file} | grep ${ignore} &>/dev/null; then
echo "ignore ${file} ${ignore}"
return 0
fi
done
return 1
}

scan_code()
{
# Redirect output to stderr.
exec 1>&2
for file in $(git diff-index --name-status HEAD^ | awk '{print $2}'); do
if should_ignore ${file}; then continue; fi
if [ ! -f ${file} ];then continue; fi
LOG_INFO "check file ${file}"
execute_cmd "${scan_code_script} $file -f json -o /tmp/report.json"
trigger_rules=$(jq -r '.' /tmp/report.json | grep 'trigger_rules' | awk '{print $2}' | sed 's/,//g')
echo "trigger_rules is ${trigger_rules}"
rm /tmp/report.json
if [ ${trigger_rules} -ne 0 ]; then
echo "######### ERROR: Scan code failed, please adjust them before commit"
exit 1
fi
done
}

install_cobra() {
git clone https://github.com/WhaleShark-Team/cobra.git ~/cobra
pip install -r ~/cobra/requirements.txt
cp ~/cobra/config.template ~/cobra/config
}

install_cobra
scan_code
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ gradle.properties
/src/test/resources/node.key
/src/test/java/org/fisco/bcos/temp
build.gradle.bak
.project
.settings/**
.classpath
58 changes: 38 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,53 @@ branches:
matrix:
fast_finish: true
include:
- os: linux
dist: xenial
sudo: required
- language: python
python: 3.6
dist: xenial
before_cache:
cache:
before_install:
script: |
bash .ci/ci_check_commit.sh
language: java
jdk:
- openjdk8
- language: java
jdk: openjdk8
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk9
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk10
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk11
os: linux
dist: xenial
sudo: required

# - language: java
# jdk: openjdk11
# os: osx
# before_install:
# - brew install gradle && gradle wrapper

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

before_install:
- gradle wrapper

script: |
curl -LO https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/release-2.0.0-rc3/tools/build_chain.sh && chmod u+x build_chain.sh
bash <(curl -s https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/master/tools/ci/download_bin.sh) -b release-2.0.0-rc3
echo "127.0.0.1:4 agency1 1,2,3" > ipconf
./build_chain.sh -e bin/fisco-bcos -f ipconf -p 30300,20200,8545 -v 2.0.0-rc3
./nodes/127.0.0.1/fisco-bcos -v
./nodes/127.0.0.1/start_all.sh
cp nodes/127.0.0.1/sdk/* src/main/resources/
mv src/main/resources/applicationContext-sample.xml src/main/resources/applicationContext.xml
./gradlew verifyGoogleJavaFormat
./gradlew build
./gradlew test
bash .ci/ci_check.sh
15 changes: 15 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### v1.0.5

(2019-09-17)

* 更新
1. `web3sdk`版本更新为`2.1.0`
2. `deployByCNS`将合约的`ABI`保存入`CNS`
3. `start.sh -p12/-pem`参数执行的文件支持相对路径,绝对路径

* 修复
1. `getTotalTransactionCount`显示结果为`null`
2. 控制台调用合约,无法区分合约`bytes` `bytesN`类型导致输入被截断
3. 多处读取文件没有关闭输入流
4. 其他修复

### v1.0.4

(2019-07-05)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ check.dependsOn.remove(verifyGoogleJavaFormat)
// In this section you declare the dependencies for your production and test code
dependencies {
// compile group: "org.fisco-bcos", name: "web3sdk", version: "2.0.31-SNAPSHOT", changing: true
compile group: 'org.fisco-bcos', name: 'web3sdk', version: '2.0.4'
compile group: 'org.fisco-bcos', name: 'web3sdk', version: '2.1.0.08-SNAPSHOT'
compile group: 'org.slf4j', name:'slf4j-log4j12', version:'1.7.25'
compile group: 'org.jline', name: 'jline', version: '3.12.0'
compile group: 'io.bretty', name: 'console-table-builder', version: '1.2'
Expand Down
3 changes: 2 additions & 1 deletion contracts/solidity/Table.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ contract Entry {

function set(string, int) public;
function set(string, string) public;
function set(string, address) public;
}

//record sets
Expand All @@ -52,4 +53,4 @@ contract Table {

function newEntry() public constant returns(Entry);
function newCondition() public constant returns(Condition);
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Dec 14 17:23:14 GMT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
22 changes: 19 additions & 3 deletions gradlew
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
Loading

0 comments on commit 0af25cf

Please sign in to comment.