Documentation ¶
Index ¶
- func Current(ctx context.Context) error
- func Major(ctx context.Context) error
- func Minor(ctx context.Context) error
- func Next(ctx context.Context) error
- func Patch(ctx context.Context) error
- func SVUVersion(v string) daggers.Option[config]
- func SVUWithOptions(ctx context.Context, opts ...daggers.Option[config]) error
- func WithBuild(b bool) daggers.Option[config]
- func WithCommand(cmd Command) daggers.Option[config]
- func WithMetadata(b bool) daggers.Option[config]
- func WithPattern(pattern string) daggers.Option[config]
- func WithPreRelease(b bool) daggers.Option[config]
- func WithPrefix(prefix string) daggers.Option[config]
- func WithSuffix(suffix string) daggers.Option[config]
- func WithTagMode(tagMode TagMode) daggers.Option[config]
- type Command
- type Output
- type TagMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SVUVersion ¶
SVUVersion specifies the version of svu to use. Defaults to v1.9.0. This should be one of the released image tags - see https://github.com/caarlos0/svu/pkgs/container/svu for available tags.
func SVUWithOptions ¶
SVUWithOptions runs svu with specific options.
func WithBuild ¶
WithBuild controls whether to include build metadata in the version. Defaults to true.
func WithCommand ¶
WithCommand sets the svu sub-command to run. Defaults to "next".
func WithMetadata ¶
WithMetadata controls whether to include pre-release and build metadata in the version. Defaults to true.
func WithPattern ¶
WithPattern sets the pattern to use when searching for tags. Defaults to "*".
func WithPreRelease ¶
WithPreRelease controls whether to include pre-release metadata in the version. Defaults to true.
func WithPrefix ¶
WithPrefix sets the prefix to use when searching for tags. Defaults to "v".
func WithSuffix ¶
WithSuffix sets the suffix to use when searching for tags. Defaults to "".
func WithTagMode ¶
WithTagMode sets the tag mode to use when searching for tags. Defaults to TagModeAllBranches.
Types ¶
type Command ¶
type Command string
Command is represents the svu sub-command.
const ( // CommandNext is the svu next sub-command. CommandNext Command = "next" // CommandMajor is the svu major sub-command. CommandMajor Command = "major" // CommandMinor is the svu minor sub-command. CommandMinor Command = "minor" // CommandPatch is the svu patch sub-command. CommandPatch Command = "patch" // CommandCurrent is the svu pre sub-command. CommandCurrent Command = "current" )
type Output ¶
type Output struct { // Version Version string // Version without the prefix VersionWithoutPrefix string }
Output is svu command output.