release

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package release implements semantic versioning and release automation for cloop. It infers the appropriate semver bump from completed task history, generates polished release notes combining changelog output with AI narration, creates an annotated git tag, and optionally pushes the tag and creates a GitHub release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferBump

func InferBump(tasks []*pm.Task, gitLog string) string

InferBump analyzes completed task titles/descriptions and the git log to determine the appropriate semver bump level. Returns "major", "minor", or "patch".

func PushTag

func PushTag(workDir, tag, remote string) error

PushTag pushes the given tag to the git remote.

Types

type Release

type Release struct {
	// Version is the bare semver string, e.g. "1.2.3".
	Version string
	// Tag is the full git tag name, e.g. "v1.2.3".
	Tag string
	// Bump is the semver bump that was applied: "major", "minor", or "patch".
	Bump string
	// PreviousTag is the tag this release is based on (empty if first release).
	PreviousTag string
	// Notes is the full release notes document in markdown.
	Notes string
	// TagCreated is true when an annotated git tag was actually created.
	TagCreated bool
	// TagPushed is true when the tag was pushed to the remote.
	TagPushed bool
	// GitHubURL is the URL of the created GitHub release, if any.
	GitHubURL string
}

Release holds the computed release metadata and generated notes.

func Generate

func Generate(
	ctx context.Context,
	p provider.Provider,
	model string,
	workDir string,
	tagPrefix string,
	bump string,
	dryRun bool,
) (*Release, error)

Generate creates a full release package:

  1. Discovers the last git tag and computes the next semver.
  2. Generates AI-narrated release notes combining changelog output.
  3. Creates an annotated git tag (unless dryRun is true).

Pushing the tag and creating a GitHub release are handled by the caller using the returned Release.Tag value.

Jump to

Keyboard shortcuts

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