release

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package release versions the project aitk manages: the next SemVer from Conventional Commits, a Keep a Changelog section, manifest versions, and an annotated tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Less added in v2.5.1

func Less(a, b Version) bool

Less orders versions by SemVer precedence (a pre-release comes before its release).

func WriteChangelog

func WriteChangelog(p *project.Project, pl *Plan) error

WriteChangelog inserts the section after "## [Unreleased]" (creating the file when absent).

func WriteManifests

func WriteManifests(p *project.Project, pl *Plan) error

WriteManifests sets the version in each manifest.

Types

type Commit

type Commit struct {
	Hash     string `json:"hash"`
	Type     string `json:"type"`
	Scope    string `json:"scope,omitempty"`
	Subject  string `json:"subject"`
	Breaking bool   `json:"breaking,omitempty"`
	Task     string `json:"task,omitempty"`
}

Commit is a parsed Conventional Commit.

type Options

type Options struct {
	Bump string // auto | major | minor | patch
	Pre  string // pre-release label, e.g. rc
}

Options control the plan.

type Plan

type Plan struct {
	Previous     string   `json:"previous"`
	Version      string   `json:"version"`
	Tag          string   `json:"tag"`
	Bump         string   `json:"bump"`
	Commits      []Commit `json:"commits"`
	Skipped      int      `json:"skipped_non_conventional"`
	Notes        string   `json:"notes"`
	Changelog    string   `json:"changelog"`
	Manifests    []string `json:"manifests,omitempty"`
	Date         string   `json:"date"`
	FirstRelease bool     `json:"first_release,omitempty"`
}

Plan describes a release.

func Make

func Make(p *project.Project, o Options) (*Plan, error)

Make computes the release plan.

type Version

type Version struct {
	Major, Minor, Patch int
	Pre                 string
}

Version is a SemVer 2.0 version.

func LastTag

func LastTag(p *project.Project) (string, Version, bool)

LastTag returns the latest release tag reachable from HEAD and its version. Tags that are not SemVer (v2-beta, nightly) are ignored rather than ending the search.

func Parse

func Parse(s string) (Version, error)

Parse reads "1.2.3" or "1.2.3-rc.1".

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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