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:
Chevdor
2022-01-24 09:44:55 +01:00
committed by GitHub
parent ef13a0ab8d
commit 0269532fa8
27 changed files with 751 additions and 17 deletions
+3 -5
View File
@@ -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