Skip to content

Add Support for Custom Tag Prefixes and Improved CLI Parsing #5

@ni-m

Description

@ni-m

Currently, the script only supports semantic versioning tags in the following formats:

  • 1.2.2-alpha
  • 1.2.2-alpha.3
  • 1.2.2-alpha.beta
  • v2.3.4-beta

For monorepos, it is important to support scoped tags that include a prefix (e.g. firmware/v1.0.1) so that each subproject can manage its versions independently.

Enhancements Required

Add support for custom tag prefixes

  • Allow the script to filter tags based on a given prefix (e.g. firmware/).

  • Ensure the versioning logic still validates semantic versioning after stripping the prefix.

  • Accept tag formats like:

    • firmware/v1.0.0
    • backend/1.2.2-alpha
    • frontend/v2.3.4-beta

Improve command-line argument parsing

  • Replace sys.argv with a robust CLI parser such as argparse.

  • Allow the user to specify:

    • Tag prefix (e.g. --prefix firmware/)
    • Other options as needed (e.g. verbosity, dry-run, etc.)

Checklist

  • Rewrite version parsing to support custom prefixes.
  • Update CLI argument parsing using a standard parser.
  • Update documentation with usage examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions