Closed chambersmp closed 1 year ago
This is a more robust solution to #325 and should be included over my implementation.
@dylanratcliffe Could you spend a little time reviewing some one these Pull requests? I know you're busy with Onceover :)
Hey sorry about how dark the repo has gone since work on Overmind took off. I've schedule a few hours on Saturday to review as much as I can 👍
Awesome, thanks @dylanratcliffe . I actually meant Overmind, not Onceover. Stop naming things beginning with O.
Addresses the issue of #324 and includes error handling from #325.
When checking comparing version numbers of current and latest modules, the DSC modules have extra characters which are unhandled by the standard version format in Versionomy.
Summary: The DSC modules on Puppet forge use a version number that is currently unsupported by the standard version format in Versionomy. When Versionomy parses the version format
8.5.0-0-2
, the-2
suffix is considered extra_character which results in stderr. This PR proposes using a custom format to add support for the fieldpatchlevel_minor
via the delimiter-
.The standard version format supports [major, minor, tiny, patchlevel] [8, 5, 0, 0] (e.g. 8.5.0-0) The proposed custom_format supports [major, minor, tiny, patchlevel, patchlevel_minor] [8, 5, 0, 0, 2] (e.g. 8.5.0-0-2)
The custom format uses
-
as the delimiter for the patchlevel_minor field. Additional support could be added later for.
or other varieties. Simply updating the regex_delimiter from (-) to (-|.) will add this support.This PR also includes the error handling from PR #325 to handle and flag any other version exceptions that may be unsupported by Versionomy default formats.
Testing: The sample puppetfile and
onceover show puppetfile
output demonstrates the benefits of the custom_format and error handling.onceover update puppetfile
can now auto correct the badly formatted versionsOutput: onceover show puppetfile
puppetforge_format
the modules patchlevel_minor is correctly checked assessedAfter
onceover update puppetfile
All modules have been updated to the latest version, all poorly formed versions have been replaced.