parse_semver

Function parse_semver 

Source
pub fn parse_semver(tag: &str) -> Option<SemverInfo>
Expand description

Parse a semantic version string Supports:

  • 2-part: 1.0
  • 3-part: 1.2.3
  • 4-part: 1.2.3.4
  • Pre-release: 1.0.0-alpha, 1.0.0-rc.1, 1.0.0-beta.1
  • Python-style pre-release: 1.2.3a1, 1.2.3b1, 1.2.3rc1
  • Build metadata: 1.0.0+build.123
  • With or without ā€˜v’ prefix (e.g., v1.0.0)
  • With custom prefixes (e.g., py-v1.0.0, rust-v1.0.0, python-1.0.0)