From 16e556492fd0d8c9dd54cdd9a2ec4a2d7fb8aeb0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 16:25:44 +0400 Subject: [PATCH] Fix Asset Hub naming in code and release notes (#71) Cleans up some usage of old naming conventions. I noticed also in the [last release](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.0.0) the old naming conventions are used. I believe we should refer to these chains as Asset Hub now? - Update Oct 24: Updated the release notes generation to replace "Statemint" and "Statemine" with "Polkadot Asset Hub (previous Statemint) and "Kusama Asset Hub (previously Statemine)". Release built with updated script: https://github.com/liamaharon/runtimes/releases/tag/v1.0.0 --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .github/workflows/release.yml | 15 +++++++++++++-- .../asset-hubs/asset-hub-kusama/tests/tests.rs | 2 +- .../asset-hubs/asset-hub-polkadot/tests/tests.rs | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 373d14f949..d19cbe550c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,9 +114,20 @@ jobs: EOF for JSON in $(<<<$CONTEXT sort -sr) - do tee -a DRAFT <<-EOF + do + SPEC_NAME=$(WASM 'core_version.specName') + # Check for spec names and adjust the heading accordingly + if [[ "$SPEC_NAME" == "statemint" ]]; then + HEADING="Asset Hub Polkadot (previously Statemint)" + elif [[ "$SPEC_NAME" == "statemine" ]]; then + HEADING="Asset Hub Kusama (previously Statemine)" + else + HEADING=$(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")') + fi - ### $(WASM 'core_version.specName / "-" | map(. / "" | first |= ascii_upcase | add) | join(" ")') + 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') diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 7d49b56e46..20477cb24e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemine (Kusama Assets Hub) chain. +//! Tests for the Kusama Asset Hub (previously known as Statemine) chain. use asset_hub_kusama_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 7200ebc16a..5af2c63c18 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Tests for the Statemint (Polkadot Assets Hub) chain. +//! Tests for the Polkadot Asset Hub (previously known as Statemint) chain. use asset_hub_polkadot_runtime::xcm_config::{ AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation,