Skip to content

Commit

Permalink
add special handing for statemint and statemine
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed Oct 24, 2023
1 parent 732d788 commit 5bf7f74
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,29 @@ jobs:
*These runtimes were built with **$(SRTOOL rustc)** using **[$(SRTOOL gen)](https://github.com/paritytech/srtool)***
EOF
for JSON in $(<<<$CONTEXT sort -sr)
do tee -a DRAFT <<-EOF
### $(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")')
~~~
🏋️ Runtime Size: $(numfmt --to iec-i --format "%.2f" $(WASM size)) ($(WASM size) bytes)
🗜 Compressed: $(WASM 'compression | if .compressed then "Yes: \(1 - .size_compressed / .size_decompressed | . * 10000 | round / 100)%" else "No" end')
🔥 Core Version: $(WASM 'core_version | "\(.specName)-\(.specVersion) \(.implName)-\(.implVersion).tx\(.transactionVersion).au\(.authoringVersion)"')
🎁 Metadata version: V$(WASM metadata_version)
🗳️ Blake2-256 hash: $(WASM blake2_256)
📦 IPFS: $(WASM ipfs_hash)
~~~
EOF
for JSON in $(<<<$CONTEXT sort -sr) do
SPEC_NAME=$(WASM 'core_version.specName')
# Check for spec names and adjust the heading accordingly
if [[ "$SPEC_NAME" == "statemint" ]]; then
HEADING="Polkadot Asset Hub (previously Statemint)"
elif [[ "$SPEC_NAME" == "statemine" ]]; then
HEADING="Kusama Asset Hub (previously Statemine)"
else
HEADING=$(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")')
fi
tee -a DRAFT <<-EOF
### $HEADING
~~~
🏋️ Runtime Size: $(numfmt --to iec-i --format "%.2f" $(WASM size)) ($(WASM size) bytes)
🗜 Compressed: $(WASM 'compression | if .compressed then "Yes: \(1 - .size_compressed / .size_decompressed | . * 10000 | round / 100)%" else "No" end')
🔥 Core Version: $(WASM 'core_version | "\(.specName)-\(.specVersion) \(.implName)-\(.implVersion).tx\(.transactionVersion).au\(.authoringVersion)"')
🎁 Metadata version: V$(WASM metadata_version)
🗳️ Blake2-256 hash: $(WASM blake2_256)
📦 IPFS: $(WASM ipfs_hash)
~~~
EOF
done
- name: Create release
Expand Down

0 comments on commit 5bf7f74

Please sign in to comment.