Skip to content

Update MerlinAU.sh Updated the Changelog Review Logic#107

Merged
Martinski4GitHub merged 2 commits intodevfrom
ExtremeFiretop-ChangeLog-Review
Jan 30, 2024
Merged

Update MerlinAU.sh Updated the Changelog Review Logic#107
Martinski4GitHub merged 2 commits intodevfrom
ExtremeFiretop-ChangeLog-Review

Conversation

@ExtremeFiretop
Copy link
Owner

Changelog review now parses the following versions as such:

3004.386.8.beta3 --> 386.8 end point for change log review
3004.386.8.4 --> 386.8 end point for change log review

Or

388.5.0 --> 388.5 end point for change log review
3004.388.5 --> 388.5 end point for change log review

Also added a changelog review bypass; incase the log contents are empty, or the "current" version of the firmware is not identified as a stopping point for the changelog file scrub.

@Martinski4GitHub
Copy link
Collaborator

Also added a changelog review bypass; incase the log contents are empty, or the "current" version of the firmware is not identified as a stopping point for the changelog file scrub.

Taking a look now...

@ExtremeFiretop
Copy link
Owner Author

ExtremeFiretop commented Jan 30, 2024

Also added a changelog review bypass; incase the log contents are empty, or the "current" version of the firmware is not identified as a stopping point for the changelog file scrub.

Taking a look now...

My only concern with parsing this way now that I review the PR is that what if we happen to just throw a note in that says "as of 388.6, blah blah blah" well that as of 388.6 for example would be considered end of the log.

@ExtremeFiretop
Copy link
Owner Author

But the bypass is absolutely required.

@Martinski4GitHub
Copy link
Collaborator

Martinski4GitHub commented Jan 30, 2024

Also added a changelog review bypass; incase the log contents are empty, or the "current" version of the firmware is not identified as a stopping point for the changelog file scrub.

Taking a look now...

My only concern with parsing this way now that I review the PR is that what if we happen to just throw a note in that says "as of 388.6, blah blah blah" well that as of 388.6 for example would be considered end of the log.

When searching for the version string, it must be at the start of the line. Try a regex that looks like this:

if ! grep -qE "^${formatted_current_version} \([0-9]+[-]" "$changelog_file"

This way it's highly unlikely to be anything other than the beginning of the section for that specific version.

@Martinski4GitHub
Copy link
Collaborator

But the bypass is absolutely required.

Agreed.

MerlinAU.sh Outdated

#For AMTM versioning:
readonly SCRIPT_VERSION=1.0.0
readonly SCRIPT_VERSION=1.0.2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why version "1.0.2"?

@ExtremeFiretop
Copy link
Owner Author

@Martinski4GitHub

Done! 👍

@ExtremeFiretop
Copy link
Owner Author

ExtremeFiretop commented Jan 30, 2024

I like the addition of the start of line check and the regex of the pattern following. (Date)
Takes care of my only concern. Ready to start merge

@Martinski4GitHub Martinski4GitHub merged commit cfc32d4 into dev Jan 30, 2024
@ExtremeFiretop ExtremeFiretop deleted the ExtremeFiretop-ChangeLog-Review branch January 30, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants