Skip to content

Commit cf5c8d9

Browse files
authored
Feat/support event db mgr (#582)
* feat: add doc store * feat: add index * test: add index test case * fix: update the error report * feat: upgrade version * fix: revert the key and case * feat: add delete event db * fix: revert evm key * fix: fix the meta and reconnect bug * feat: update docker release cd * feat: update the readme * feat: update release
1 parent 769d214 commit cf5c8d9

File tree

10 files changed

+19
-21
lines changed

10 files changed

+19
-21
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ jobs:
3232
- name: Setup build env
3333
run: |
3434
ROOT_DIR=`pwd`
35+
sudo apt-get install protobuf-compiler
36+
cargo install cargo-edit
3537
cd ${ROOT_DIR}/metadata && yarn install && npx hardhat compile
3638
test -e ${ROOT_DIR}/metadata/artifacts/contracts/DB3MetaStore.sol/DB3MetaStore.json && cp -f ${ROOT_DIR}/metadata/artifacts/contracts/DB3MetaStore.sol/DB3MetaStore.json ${ROOT_DIR}/abi/
37-
if [[ ${{ matrix.job.target }} == x86_64-unknown-linux-gnu ]]; then
38-
sudo apt-get install protobuf-compiler
39-
fi
40-
if [[ ${{ matrix.job.target }} == x86_64-apple-darwin ]]; then
41-
brew install protobuf
42-
fi
39+
test -e ${ROOT_DIR}/metadata/artifacts/contracts/libraries/Events.sol/Events.json && cp -f ${ROOT_DIR}/metadata/artifacts/contracts/libraries/Events.sol/Events.json ${ROOT_DIR}/abi/
40+
cd ${ROOT_DIR}
41+
TAG=${GITHUB_REF/refs\/tags\//}
42+
VERSION=${TAG#*v}
43+
cargo set-version --workspace ${VERSION}
4344
- name: Cargo build
4445
uses: actions-rs/cargo@v1
4546
with:
@@ -51,17 +52,14 @@ jobs:
5152
shell: bash
5253
run: |
5354
cd target/${{ matrix.job.target }}/release
55+
TAG=${GITHUB_REF/refs\/tags\//}
56+
VERSION=${TAG#*v}
5457
RELEASE_NAME=db3-${GITHUB_REF/refs\/tags\//}-${{ matrix.job.os-name }}-${{ matrix.job.architecture }}
5558
mkdir -p $RELEASE_NAME/bin
5659
DB3_BINARY_NAME=db3
5760
mv $DB3_BINARY_NAME $TM_BINARY_NAME $RELEASE_NAME/bin/
5861
tar czvf $RELEASE_NAME.tar.gz $RELEASE_NAME
59-
########## create sha256 ##########
60-
if [[ ${{ runner.os }} == 'Windows' ]]; then
61-
certutil -hashfile $RELEASE_NAME.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > $RELEASE_NAME.sha256
62-
else
63-
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
64-
fi
62+
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
6563
- name: Releasing assets
6664
uses: softprops/action-gh-release@v1
6765
with:

src/base/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-base"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "base module of db3"

src/cmd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-cmd"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "cmd module of db3"

src/crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-crypto"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "crypto module of db3"

src/error/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-error"
3-
version = "0.1.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "error module of db3"

src/event/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-event"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55

66
[dependencies]

src/node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-node"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55

66
[[bin]]

src/proto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-proto"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "proto module of db3"

src/sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-sdk"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "sdk module of db3"

src/storage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "db3-storage"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
edition = "2021"
55
authors = ["jack wang <[email protected]>"]
66
description = "storage module of db3"

0 commit comments

Comments
 (0)