mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
New changelog scripts (#4491)
* Add templates * Add folder for local storage of the digests * Add first draft of the changelog scripts * Enable Audits in the change template * Fixes for Polkadot * Fix templating issue in case there is no high prio change * Fix Ruby setup * Remove shell * Fix chain names * Fix ENV * Fix how to get runtime * Fix runtime_dir * Fix context location * Pin changelogerator to a specific version
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A collection of helper functions that might be useful for various scripts
|
||||
|
||||
# Gets the runtime version for a given runtime.
|
||||
# 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, path = '.')
|
||||
File.open(path + "/runtime/#{runtime}/src/lib.rs") do |f|
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user