Skip to content

Commit 935c7f4

Browse files
bkonturpepoviolaEgorPopelyaev
authored
Add --version to the ChainSpecBuilder command for staging-chain-spec-builder (#4752)
## TODO - [x] test/confirm that the release script is ok --------- Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com> Co-authored-by: Egor_P <egor@parity.io>
1 parent 988103d commit 935c7f4

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

.github/workflows/release-30_publish_release_draft.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
binary: [ frame-omni-bencher, chain-spec-builder ]
34+
# Tuples of [package, binary-name]
35+
binary: [ [frame-omni-bencher, frame-omni-bencher], [staging-chain-spec-builder, chain-spec-builder] ]
3536
steps:
3637
- name: Checkout sources
3738
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
@@ -41,21 +42,16 @@ jobs:
4142
sudo apt update
4243
sudo apt install -y protobuf-compiler
4344
44-
- name: Build ${{ matrix.binary }} binary
45+
- name: Build ${{ matrix.binary[1] }} binary
4546
run: |
46-
if [[ ${{ matrix.binary }} =~ chain-spec-builder ]]; then
47-
cargo build --locked --profile=production -p staging-${{ matrix.binary }} --bin ${{ matrix.binary }}
48-
target/production/${{ matrix.binary }} -h
49-
else
50-
cargo build --locked --profile=production -p ${{ matrix.binary }}
51-
target/production/${{ matrix.binary }} --version
52-
fi
47+
cargo build --locked --profile=production -p ${{ matrix.binary[0] }} --bin ${{ matrix.binary[1] }}
48+
target/production/${{ matrix.binary[1] }} --version
5349
54-
- name: Upload ${{ matrix.binary }} binary
50+
- name: Upload ${{ matrix.binary[1] }} binary
5551
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
5652
with:
57-
name: ${{ matrix.binary }}
58-
path: target/production/${{ matrix.binary }}
53+
name: ${{ matrix.binary[1] }}
54+
path: target/production/${{ matrix.binary[1] }}
5955

6056

6157
publish-release-draft:

substrate/bin/utils/chain-spec-builder/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ use serde_json::Value;
125125

126126
/// A utility to easily create a chain spec definition.
127127
#[derive(Debug, Parser)]
128-
#[command(rename_all = "kebab-case")]
128+
#[command(rename_all = "kebab-case", version, about)]
129129
pub struct ChainSpecBuilder {
130130
#[command(subcommand)]
131131
pub command: ChainSpecBuilderCmd,

substrate/utils/frame/omni-bencher/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license.workspace = true
1111
workspace = true
1212

1313
[dependencies]
14-
clap = { version = "4.5.2", features = ["derive"] }
14+
clap = { version = "4.5.3", features = ["derive"] }
1515
cumulus-primitives-proof-size-hostfunction = { path = "../../../../cumulus/primitives/proof-size-hostfunction" }
1616
frame-benchmarking-cli = { path = "../benchmarking-cli", default-features = false }
1717
sc-cli = { path = "../../../client/cli" }

0 commit comments

Comments
 (0)