relizy / extractVersionFromTag
Function: extractVersionFromTag()
extractVersionFromTag(
tag,packageName?):string|null
Defined in: src/core/version.ts:787
Extracts a semantic version from a git tag. Supports multiple tag formats:
- v1.2.3 → 1.2.3
- 1.2.3 → 1.2.3
- [email protected] → 1.2.3
- v1.2.3-beta.0 → 1.2.3-beta.0
Parameters
tag
string
The git tag to extract version from
packageName?
string
Optional package name for independent mode tags (e.g., "[email protected]")
Returns
string | null
The extracted version string or null if invalid