gitflowutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MASTER                = "master"
	HOTFIX                = "hotfix/"
	HOTFIX_WITHOUT_SLASH  = "hotfix"
	SUPPORT               = "support/"
	SUPPORT_WITHOUT_SLASH = "support"
	RELEASE               = "release/"
	RELEASE_WITHOUT_SLASH = "release"
	DEVELOP               = "develop"
	FEATURE               = "feature/"
	FEATURE_WITHOUT_SLASH = "feature"

	DEFAULT = "default"
)
View Source
const (
	DefaultWorkspace string = "DEFAULT"
	// DevWorkspace 开发环境
	DevWorkspace string = "DEV"
	// TestWorkspace 测试环境
	TestWorkspace string = "TEST"
	// StagingWorkspace 预发环境
	StagingWorkspace string = "STAGING"
	// ProdWorkspace 生产环境
	ProdWorkspace string = "PROD"
)

DiceWorkspace dice 部署环境:DEV、TEST、STAGING、PROD

Variables

This section is empty.

Functions

func ErrorNotSupportedReference

func ErrorNotSupportedReference(reference string) error

func GetReferencePrefix

func GetReferencePrefix(reference string) (string, error)

func IsDevelop

func IsDevelop(branch string) bool

func IsFeature

func IsFeature(branch string) bool

func IsHotfix

func IsHotfix(branch string) bool

func IsMaster

func IsMaster(branch string) bool

func IsRelease

func IsRelease(branch string) bool

func IsReleaseTag

func IsReleaseTag(tag string) bool

func IsSupport

func IsSupport(branch string) bool

func IsValid

func IsValid(reference string) bool

func IsValidBranchWorkspace

func IsValidBranchWorkspace(rules []apistructs.ValidBranch, expectWorkspace apistructs.DiceWorkspace) (validWorkspace, validArtifactWorkspace bool)

IsValidBranchWorkspace return if expectWorkspace is valid workspace & artifactWorkspace

Types

type PrefixAndBranch

type PrefixAndBranch struct {
	Workspace string
	Branch    string
}

map:

key: prefix with slash
value: prefix with mock

func ListAllBranchPrefix

func ListAllBranchPrefix() []PrefixAndBranch

Jump to

Keyboard shortcuts

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