version

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package version computes the next release tag from the latest one using a small, predictable set of bump rules. While lumos is pre-1.0 every bump produces an alpha pre-release; the Stable level promotes the current numbers to a final release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Next

func Next(latest string, level Level) (string, error)

Next returns the next tag after latest for the given bump level. An empty latest is treated as v0.0.0 (no releases yet), so the first prerelease or patch bump yields v0.0.1-alpha.1.

Types

type Level

type Level int

Level is the kind of version bump to apply.

const (
	Prerelease Level = iota // bump the pre-release counter (the default)
	Patch
	Minor
	Major
	Stable // drop the pre-release, finalising the current numbers
)

The available bump levels.

func BumpFromMessage

func BumpFromMessage(msg string) Level

BumpFromMessage derives a bump level from a commit message, honouring an explicit [major], [minor], [patch] or [stable] marker. The default is a pre-release bump.

func ParseLevel

func ParseLevel(s string) (Level, error)

ParseLevel maps a level name to a Level.

Jump to

Keyboard shortcuts

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