mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 20:48:01 +00:00
ce2403808b
* WIP Release notes generation and templates * WIP Add new sections to the template * WIP renaming and wip * Fix runtime template * Add doc, NO_CACHE and tweaking of the templates * Renaming cl into cumulus to make room for the polkadot and substrate * Fetch data from Substrate and Polkadot * WIP convert bash script to ruby * Convert to Ruby * Fix host function delection * Extract priority to a macro * Fix misc changes * Draft release workflow * Fix runtime dir * Add ENV to ignore runtimes * Install tooling separately * WIP troubleshooting - remove sudo * Minor formatting fixes * Fix workflow * Add missing dep * Linting * Fix changelog script * Add missing tera install * Use absolute paths * Fix path + cleanup * Fix changelog generation * Add missing pre-release ENV * Fix rust version ENV * Fix release notes path * Fix output * Fix runtime_dir for cumulus * Fix ENV substitutions * Fix styling * Debugging * Styling * Fix call to fetch the runtime version * Cleanup and doc * Delete sample .env * Update scripts/changelog/templates/change.md.tera Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Change XCM emoji marker for a ✉️ Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
11 lines
409 B
Ruby
11 lines
409 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Gets the runtime version for a given runtime from the filesystem.
|
|
# Optionally accepts a path that is the root of the project which defaults to
|
|
# the current working directory
|
|
def get_runtime(runtime: nil, path: '.', runtime_dir: 'runtime')
|
|
File.open(path + "/#{runtime_dir}/#{runtime}/src/lib.rs") do |f|
|
|
f.find { |l| l =~ /spec_version/ }.match(/[0-9]+/)[0]
|
|
end
|
|
end
|