Skip to content

Commit ea3eee7

Browse files
chore(cli): apply new cli to documents and scripts
1 parent 294e439 commit ea3eee7

11 files changed

Lines changed: 96 additions & 56 deletions

.github/workflows/axon-start-with-short-genesis.yml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ jobs:
3838
run: |
3939
target/debug/axon --version | tee ${{ env.LOG_FILE }}
4040
target/debug/axon init \
41-
--config devtools/chain/config.toml \
41+
--config devtools/chain/config.toml \
4242
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
43+
--key-file devtools/chain/debug.key \
4344
| tee -a ${{ env.LOG_FILE }}
4445
target/debug/axon run \
45-
--config devtools/chain/config.toml \
46+
--config devtools/chain/config.toml \
4647
| tee -a ${{ env.LOG_FILE }} &
4748
4849
sleep 10
@@ -89,35 +90,19 @@ jobs:
8990
9091
target/debug/axon --version
9192
92-
target/debug/axon init \
93-
--config devtools/chain/nodes/node_1.toml \
94-
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
95-
> ${{ env.LOG_PATH }}/node_1.log
96-
target/debug/axon init \
97-
--config devtools/chain/nodes/node_2.toml \
98-
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
99-
> ${{ env.LOG_PATH }}/node_2.log
100-
target/debug/axon init \
101-
--config devtools/chain/nodes/node_3.toml \
102-
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
103-
> ${{ env.LOG_PATH }}/node_3.log
104-
target/debug/axon init \
105-
--config devtools/chain/nodes/node_4.toml \
106-
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
107-
> ${{ env.LOG_PATH }}/node_4.log
93+
for id in 1 2 3 4; do
94+
target/debug/axon init \
95+
--config devtools/chain/nodes/node_${id}.toml \
96+
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
97+
--key-file devtools/chain/debug.key \
98+
> ${{ env.LOG_PATH }}/node_${id}.log
99+
done
108100
109-
target/debug/axon run \
110-
--config devtools/chain/nodes/node_1.toml \
111-
>> ${{ env.LOG_PATH }}/node_1.log &
112-
target/debug/axon run \
113-
--config devtools/chain/nodes/node_2.toml \
114-
>> ${{ env.LOG_PATH }}/node_2.log &
115-
target/debug/axon run \
116-
--config devtools/chain/nodes/node_3.toml \
117-
>> ${{ env.LOG_PATH }}/node_3.log &
118-
target/debug/axon run \
119-
--config devtools/chain/nodes/node_4.toml \
120-
>> ${{ env.LOG_PATH }}/node_4.log &
101+
for id in 1 2 3 4; do
102+
target/debug/axon run \
103+
--config devtools/chain/nodes/node_${id}.toml \
104+
>> ${{ env.LOG_PATH }}/node_${id}.log &
105+
done
121106
122107
npx zx <<'EOF'
123108
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'

.github/workflows/openzeppelin_test_11.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ jobs:
108108
- name: Deploy Local Network of Axon
109109
run: |
110110
rm -rf ./devtools/chain/data
111-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
112-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
111+
./target/debug/axon init \
112+
--config devtools/chain/config.toml \
113+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
114+
--key-file devtools/chain/debug.key \
115+
> /tmp/log 2>&1
116+
./target/debug/axon run \
117+
--config devtools/chain/config.toml \
118+
>> /tmp/log 2>&1 &
113119
114120
- name: Run prepare
115121
id: runtest

.github/workflows/openzeppelin_test_16_19.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ jobs:
108108
- name: Deploy Local Network of Axon
109109
run: |
110110
rm -rf ./devtools/chain/data
111-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
112-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
111+
./target/debug/axon init \
112+
--config devtools/chain/config.toml \
113+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
114+
--key-file devtools/chain/debug.key \
115+
> /tmp/log 2>&1
116+
./target/debug/axon run \
117+
--config devtools/chain/config.toml \
118+
>> /tmp/log 2>&1 &
113119
114120
- name: Run prepare
115121
id: runtest

.github/workflows/openzeppelin_test_1_5_and_12_15.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,14 @@ jobs:
109109
- name: Deploy Local Network of Axon
110110
run: |
111111
rm -rf ./devtools/chain/data
112-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
113-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
112+
./target/debug/axon init \
113+
--config devtools/chain/config.toml \
114+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
115+
--key-file devtools/chain/debug.key \
116+
> /tmp/log 2>&1
117+
./target/debug/axon run \
118+
--config devtools/chain/config.toml \
119+
>> /tmp/log 2>&1 &
114120
115121
- name: Run prepare
116122
id: runtest

.github/workflows/openzeppelin_test_6_10.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ jobs:
108108
- name: Deploy Local Network of Axon
109109
run: |
110110
rm -rf ./devtools/chain/data
111-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
112-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
111+
./target/debug/axon init \
112+
--config devtools/chain/config.toml \
113+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
114+
--key-file devtools/chain/debug.key \
115+
> /tmp/log 2>&1
116+
./target/debug/axon run \
117+
--config devtools/chain/config.toml \
118+
>> /tmp/log 2>&1 &
113119
- name: Run prepare
114120
id: runtest
115121
run: |

.github/workflows/somking_test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ jobs:
2323
- name: Start axon
2424
run: |
2525
cd ${{ github.workspace }}/axon
26-
./axon init --config ${{ github.workspace }}/axon/config.toml --chain-spec ${{ github.workspace }}/axon/specs/single_node/chain-spec.toml > /tmp/log 2>&1
27-
./axon run --config ${{ github.workspace }}/axon/config.toml >> /tmp/log 2>&1 &
26+
./axon init \
27+
--config ${{ github.workspace }}/axon/config.toml \
28+
--chain-spec ${{ github.workspace }}/axon/specs/single_node/chain-spec.toml \
29+
--key-file ${{ github.workspace }}/axon/debug.key \
30+
> /tmp/log 2>&1
31+
./axon run \
32+
--config ${{ github.workspace }}/axon/config.toml \
33+
>> /tmp/log 2>&1 &
2834
sleep 120
2935
- name: Check Axon Status
3036
run: |

.github/workflows/v3_core_test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,14 @@ jobs:
9797
- name: Deploy Local Network of Axon
9898
run: |
9999
rm -rf ./devtools/chain/data
100-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
101-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
100+
./target/debug/axon init \
101+
--config devtools/chain/config.toml \
102+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
103+
--key-file devtools/chain/debug.key \
104+
> /tmp/log 2>&1
105+
./target/debug/axon run \
106+
--config devtools/chain/config.toml \
107+
>> /tmp/log 2>&1 &
102108
- name: Install dependencies
103109
run: |
104110
cd /home/runner/work/axon/axon/v3-core

.github/workflows/web3_compatible.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ jobs:
6767
run: |
6868
rm -rf ./devtools/chain/data
6969
./target/debug/axon init \
70-
--config devtools/chain/config.toml \
70+
--config devtools/chain/config.toml \
7171
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
72+
--key-file devtools/chain/debug.key \
7273
> /tmp/log 2>&1
7374
./target/debug/axon run \
74-
--config devtools/chain/config.toml \
75+
--config devtools/chain/config.toml \
7576
>> /tmp/log 2>&1 &
7677
7778
- name: Checkout gpBlockchain/axon-test

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,14 @@ e2e-test-lint:
6363
e2e-test:
6464
cargo build
6565
rm -rf ./devtools/chain/data
66-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
67-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
66+
./target/debug/axon init \
67+
--config devtools/chain/config.toml \
68+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
69+
--key-file devtools/chain/debug.key \
70+
> /tmp/log 2>&1
71+
./target/debug/axon run \
72+
--config devtools/chain/config.toml \
73+
>> /tmp/log 2>&1 &
6874
cd tests/e2e && yarn
6975
cd tests/e2e/src && yarn exec http-server &
7076
cd tests/e2e && yarn exec wait-on -t 5000 tcp:8000 && yarn exec wait-on -t 5000 tcp:8080 && yarn test
@@ -74,8 +80,14 @@ e2e-test:
7480
e2e-test-ci:
7581
cargo build
7682
rm -rf ./devtools/chain/data
77-
./target/debug/axon init --config devtools/chain/config.toml --chain-spec devtools/chain/specs/single_node/chain-spec.toml > /tmp/log 2>&1
78-
./target/debug/axon run --config devtools/chain/config.toml >> /tmp/log 2>&1 &
83+
./target/debug/axon init \
84+
--config devtools/chain/config.toml \
85+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
86+
--key-file devtools/chain/debug.key \
87+
> /tmp/log 2>&1
88+
./target/debug/axon run \
89+
--config devtools/chain/config.toml \
90+
>> /tmp/log 2>&1 &
7991
cd tests/e2e && yarn
8092
cd tests/e2e/src && yarn exec http-server &
8193
cd tests/e2e && yarn exec wait-on -t 5000 tcp:8000 && yarn exec wait-on -t 5000 tcp:8080 && HEADLESS=true yarn test

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img src="./docs/assets/logo/axon-01.png" width="450">
44
</a>
55
<p align="center">
6-
<a href="https://github.com/axonweb3/axon/releases"><img src="https://img.shields.io/github/v/release/axonweb3/axon?sort=semver"></a>
6+
<a href="https://github.com/axonweb3/axon/releases"><img src="https://img.shields.io/github/v/release/axonweb3/axon?sort=semver"></a>
77
<a href = "https://hub.docker.com/r/axonweb3/axon/tags"><img src = "https://img.shields.io/docker/pulls/axonweb3/axon"></a>
88
<a href="https://github.com/axonweb3/axon/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg"></a>
99
<a href="https://github.com/axonweb3/axon"><img src="https://github.com/axonweb3/axon/actions/workflows/web3_compatible.yml/badge.svg?branch=main"></a>
@@ -52,8 +52,12 @@ Axon provides the compiled binary on the [release page](`https://github.com/axon
5252
# Clone from GitHub
5353
git clone https://github.com/axonweb3/axon.git && cd axon
5454
# Run release binary for single node
55-
cargo run --release -- init -c devtools/chain/config.toml -s devtools/chain/specs/single_node/chain-spec.toml
56-
cargo run --release -- run -c devtools/chain/config.toml
55+
cargo build --release
56+
target/release/axon init \
57+
--config devtools/chain/config.toml \
58+
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
59+
--key-file devtools/chain/debug.key
60+
target/release/axon run --config devtools/chain/config.toml
5761

5862
```
5963

0 commit comments

Comments
 (0)