Skip to content

Commit

Permalink
Add --version to the ChainSpecBuilder command for `staging-chain-…
Browse files Browse the repository at this point in the history
…spec-builder` (#4752)

## TODO

- [x] test/confirm that the release script is ok

---------

Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: Egor_P <[email protected]>
  • Loading branch information
3 people authored and Ank4n committed Jun 14, 2024
1 parent 6c113c8 commit 352e199
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/release-30_publish_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
binary: [ frame-omni-bencher, chain-spec-builder ]
# Tuples of [package, binary-name]
binary: [ [frame-omni-bencher, frame-omni-bencher], [staging-chain-spec-builder, chain-spec-builder] ]
steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
Expand All @@ -41,21 +42,16 @@ jobs:
sudo apt update
sudo apt install -y protobuf-compiler
- name: Build ${{ matrix.binary }} binary
- name: Build ${{ matrix.binary[1] }} binary
run: |
if [[ ${{ matrix.binary }} =~ chain-spec-builder ]]; then
cargo build --locked --profile=production -p staging-${{ matrix.binary }} --bin ${{ matrix.binary }}
target/production/${{ matrix.binary }} -h
else
cargo build --locked --profile=production -p ${{ matrix.binary }}
target/production/${{ matrix.binary }} --version
fi
cargo build --locked --profile=production -p ${{ matrix.binary[0] }} --bin ${{ matrix.binary[1] }}
target/production/${{ matrix.binary[1] }} --version
- name: Upload ${{ matrix.binary }} binary
- name: Upload ${{ matrix.binary[1] }} binary
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ${{ matrix.binary }}
path: target/production/${{ matrix.binary }}
name: ${{ matrix.binary[1] }}
path: target/production/${{ matrix.binary[1] }}


publish-release-draft:
Expand Down
2 changes: 1 addition & 1 deletion substrate/bin/utils/chain-spec-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ use serde_json::Value;

/// A utility to easily create a chain spec definition.
#[derive(Debug, Parser)]
#[command(rename_all = "kebab-case")]
#[command(rename_all = "kebab-case", version, about)]
pub struct ChainSpecBuilder {
#[command(subcommand)]
pub command: ChainSpecBuilderCmd,
Expand Down
2 changes: 1 addition & 1 deletion substrate/utils/frame/omni-bencher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license.workspace = true
workspace = true

[dependencies]
clap = { version = "4.5.2", features = ["derive"] }
clap = { version = "4.5.3", features = ["derive"] }
cumulus-primitives-proof-size-hostfunction = { path = "../../../../cumulus/primitives/proof-size-hostfunction" }
frame-benchmarking-cli = { path = "../benchmarking-cli", default-features = false }
sc-cli = { path = "../../../client/cli" }
Expand Down

0 comments on commit 352e199

Please sign in to comment.