mirror of
https://github.com/elastic/logstash.git
synced 2025-06-27 17:08:55 -04:00
[chore] update ID format of release notes tool (#17636)
change the format of release version from `900` to `9.0.0` for automated URL generation Relates: elastic/docs-content#1152
This commit is contained in:
parent
94b516968b
commit
b9381aff69
1 changed files with 4 additions and 5 deletions
|
@ -37,17 +37,16 @@ report = []
|
|||
`git checkout #{release_branch}`
|
||||
|
||||
current_release = YAML.load(IO.read("versions.yml"))["logstash"]
|
||||
current_release_no_dot = current_release.tr(".", "")
|
||||
|
||||
release_notes = IO.read(RELEASE_NOTES_PATH).split("\n")
|
||||
|
||||
coming_tag_index = release_notes.find_index {|line| line.match(/^## #{current_release} \[logstash-#{current_release_no_dot}-release-notes\]$/) }
|
||||
coming_tag_index = release_notes.find_index {|line| line.match(/^## #{current_release} \[logstash-#{current_release}-release-notes\]$/) }
|
||||
coming_tag_index += 1 if coming_tag_index
|
||||
release_notes_entry_index = coming_tag_index || release_notes.find_index {|line| line.match(/\[logstash-\d+-release-notes\]$/) }
|
||||
|
||||
unless coming_tag_index
|
||||
report << "## #{current_release} [logstash-#{current_release_no_dot}-release-notes]\n\n"
|
||||
report << "### Features and enhancements [logstash-#{current_release_no_dot}-features-enhancements]\n"
|
||||
report << "## #{current_release} [logstash-#{current_release}-release-notes]\n\n"
|
||||
report << "### Features and enhancements [logstash-#{current_release}-features-enhancements]\n"
|
||||
end
|
||||
|
||||
plugin_changes = {}
|
||||
|
@ -87,7 +86,7 @@ report << "Changed plugin versions:"
|
|||
plugin_changes.each {|p, v| report << "#{p}: #{v.first} -> #{v.last}" }
|
||||
report << "---------- GENERATED CONTENT ENDS HERE ------------\n"
|
||||
|
||||
report << "### Plugins [logstash-plugin-#{current_release_no_dot}-changes]\n"
|
||||
report << "### Plugins [logstash-plugin-#{current_release}-changes]\n"
|
||||
|
||||
plugin_changes.each do |plugin, versions|
|
||||
_, type, name = plugin.split("-")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue