Optum / semver-cli

Apache License 2.0
8 stars 1 forks source link

Add v major regexp #65

Closed rslayman closed 4 months ago

rslayman commented 4 months ago

Proposed changes

Add support for vMajor versions that are often used in GitHub Actions and Workflows.

Building off of the previously utilized variant field, creating new VariantKey typeversion_major that when used with the example semver value of 1.2.3 will have a version_major value of v1.

Example:

- kind: regexp
  pattern: '(?<=org/my-cool-actions/.*@).*'
  flags: g
  variant: version_major

Changes after PR Review

  1. Changed variant naming convention to format. Based on review comment
  2. Updated FormatKind (previously VariantKey) fields to match naming convention. Based on review comment
  3. Added new regexp optional parameter prefix to allow for user customized prefix values on generated versions. Based on review comment

- kind: regexp
  pattern: '(?<=org/my-cool-actions/.*@).*'
  flags: g
  file: ./.github/README.md
  format: major
  prefix: v
rslayman commented 4 months ago

@justinmchase updates have been made per your review comments.