composer

package
v0.0.0-...-526c146 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 DeriveVersion(tagOrBranchName string, isBranch bool) (version string, normalizedVersion string, error error)

func MutateComposerFile

func MutateComposerFile(path, version, normalizedVersion string, source *Source) error

func NormaliseVersion

func NormaliseVersion(version, fullVersion string) (string, error)

func NormalizeBranch

func NormalizeBranch(name string) (string, error)

func ParseNumericAliasPrefix

func ParseNumericAliasPrefix(branch string) string

Types

type ComposerFile

type ComposerFile map[string]interface{}

noinspection GoNameStartsWithPackageName

func LoadFile

func LoadFile(path string) (file ComposerFile, error error)

type Source

type Source struct {
	Type      string `json:"type"`
	Url       string `json:"url"`
	Reference string `json:"reference"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL