Documentation ¶
Index ¶
- Constants
- func DeriveVersion(tagOrBranchName string, isBranch bool) (version string, normalizedVersion string, error error)
- func MutateComposerFile(path, version, normalizedVersion string, source *Source) error
- func NormaliseVersion(version, fullVersion string) (string, error)
- func NormalizeBranch(name string) (string, error)
- func ParseNumericAliasPrefix(branch string) string
- type ComposerFile
- type Source
Constants ¶
View Source
const ModifierRegex = `[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*)?)?([.-]?dev)?`
Regex to match pre-release data (sort of).
Due to backwards compatibility:
Instead of enforcing hyphen, an underscore, dot or nothing at all are also accepted.
Only stabilities as recognized by Composer are allowed to precede a numerical identifier.
Numerical-only pre-release identifiers are not supported, see tests.
|--------------|
[major].[minor].[patch] -[pre-release] +[build-metadata]
Variables ¶
This section is empty.
Functions ¶
func DeriveVersion ¶
func MutateComposerFile ¶
func NormaliseVersion ¶
func NormalizeBranch ¶
func ParseNumericAliasPrefix ¶
Types ¶
type ComposerFile ¶
type ComposerFile map[string]interface{}
noinspection GoNameStartsWithPackageName
func LoadFile ¶
func LoadFile(path string) (file ComposerFile, error error)
Click to show internal directories.
Click to hide internal directories.