Skip to content

scripts: add version mapping automation v2

Jason Plum requested to merge 999-automate-version-mapping into master

Adds lib/version_mapping.rb

Built around treating the file as an array of strings, finding the version mapping table by known header, and then replacing the content after updating & sorting in memory.

Process:

  • load version_mappings.md into VersionMapping::Document
  • locate and parse the table from document into VersionMapping::Table
  • append to the table, where a matching chart Version will overwrite an existing entry by the same version
  • write back to version_mappings.md, automatically sorting table
vm = VersionMapping.new(filepath) # will instantiate Document
vm.insert_version(chart_version,app_version) # insert / update versions
vm.finalize #perform write

Missing:

Closes #999 (closed)

Edited by Jason Plum

Merge request reports