Skip to content

findSemanticVersion method parses only first patch char #142

Closed
@romanlytovchenko

Description

@romanlytovchenko

Hello Tomas,
it's really great tool, but using tag with long patch in version (like 1.2.333) works strange for me - it treats the version as 1.2.3.

I've investigate a little and find out regular expression here:

Pattern.compile("[0-9]+\\.[0-9]+\\.?[0-9]+?").matcher(tag);

My assumption what is wrong:

  • current result (marked with bold)
    printf '1.2.33333' | grep -E '[0-9]+.[0-9]+.?[0-9]+?'
    1.2.33333
  • my expected result
    printf '1.2.33333' | grep -E '[0-9]+.[0-9]+.?[0-9]+'
    1.2.33333

Also I've tested it with older lib version
npm i git-changelog-command-line@1.101.1
and get "long patch"

I hope for a quick fix if my findings are correct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions