From e2e57cb8f6f156656733cc18931e39f0e47d3f1c Mon Sep 17 00:00:00 2001
From: s3krit <pugh@s3kr.it>
Date: Wed, 28 Oct 2020 13:18:41 +0100
Subject: [PATCH] rollback spec_version and fix check_runtime (#1868)

---
 polkadot/runtime/kusama/src/lib.rs       | 2 +-
 polkadot/runtime/polkadot/src/lib.rs     | 2 +-
 polkadot/runtime/westend/src/lib.rs      | 2 +-
 polkadot/scripts/gitlab/check_runtime.sh | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs
index 38adfcd9298..54ae7a16250 100644
--- a/polkadot/runtime/kusama/src/lib.rs
+++ b/polkadot/runtime/kusama/src/lib.rs
@@ -88,7 +88,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
 	spec_name: create_runtime_str!("kusama"),
 	impl_name: create_runtime_str!("parity-kusama"),
 	authoring_version: 2,
-	spec_version: 2027,
+	spec_version: 2026,
 	impl_version: 0,
 	#[cfg(not(feature = "disable-runtime-api"))]
 	apis: RUNTIME_API_VERSIONS,
diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs
index df50d12190b..e2e0b1780ec 100644
--- a/polkadot/runtime/polkadot/src/lib.rs
+++ b/polkadot/runtime/polkadot/src/lib.rs
@@ -90,7 +90,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
 	spec_name: create_runtime_str!("polkadot"),
 	impl_name: create_runtime_str!("parity-polkadot"),
 	authoring_version: 0,
-	spec_version: 27,
+	spec_version: 26,
 	impl_version: 0,
 	#[cfg(not(feature = "disable-runtime-api"))]
 	apis: RUNTIME_API_VERSIONS,
diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs
index ba0d1604ec7..c048d3d43c6 100644
--- a/polkadot/runtime/westend/src/lib.rs
+++ b/polkadot/runtime/westend/src/lib.rs
@@ -85,7 +85,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
 	spec_name: create_runtime_str!("westend"),
 	impl_name: create_runtime_str!("parity-westend"),
 	authoring_version: 2,
-	spec_version: 47,
+	spec_version: 46,
 	impl_version: 0,
 	#[cfg(not(feature = "disable-runtime-api"))]
 	apis: RUNTIME_API_VERSIONS,
diff --git a/polkadot/scripts/gitlab/check_runtime.sh b/polkadot/scripts/gitlab/check_runtime.sh
index 0c635c88246..7b2a4a1fafa 100755
--- a/polkadot/scripts/gitlab/check_runtime.sh
+++ b/polkadot/scripts/gitlab/check_runtime.sh
@@ -24,7 +24,7 @@ SUBSTRATE_REPO_CARGO="git\+${SUBSTRATE_REPO}"
 SUBSTRATE_VERSIONS_FILE="bin/node/runtime/src/lib.rs"
 
 # figure out the latest release tag
-LATEST_TAG="$(git tag -l | sort -V | tail -n 1)"
+LATEST_TAG="$(git tag -l | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)"
 boldprint "latest release tag ${LATEST_TAG}"
 
 boldprint "latest 10 commits of ${CI_COMMIT_REF_NAME}"
-- 
GitLab