0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-15 05:50:39 +00:00
wp-plugin-go/drone/calver.go

34 lines
709 B
Go
Raw Normal View History

2020-09-11 13:36:36 +00:00
// Copyright (c) 2020, the Drone Plugins project authors.
package drone
// CalVer represents the calendar version of the currently running build.
//
// This value is only applicable for tags. If the tag cannot be parsed into
// a calendar version then the value will be empty.
type CalVer struct {
// Version is the full calendar version.
Version string
// Major is the major version.
Major string
// Minor is the minor version.
Minor string
// Micro is the micro version.
Micro string
// Modifier is a modifier for the version.
Modifier string
// Short is the short version.
//
// This does not include the modifier.
Short string
}
func (c CalVer) String() string {
return c.Version
}