prerelease

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteState

func DeleteState(path string) error

DeleteState removes the pre-release state file. Returns nil if the file does not exist.

func Exists

func Exists(path string) bool

Exists checks if the pre-release state file exists at the given path.

func WriteState

func WriteState(path string, state *State) error

WriteState writes the pre-release state to the given path with file locking. Uses atomic write (write to temp file, then rename).

Types

type PackageState

type PackageState struct {
	Stage         string `yaml:"stage"`
	Counter       int    `yaml:"counter"`
	TargetVersion string `yaml:"targetVersion"`
}

PackageState tracks the pre-release state for a single package

type State

type State struct {
	Packages map[string]PackageState `yaml:"packages"`
}

State represents the pre-release state file (.shipyard/prerelease.yml)

func ReadState

func ReadState(path string) (*State, error)

ReadState reads the pre-release state from the given path with shared file locking. Returns an empty state (not an error) if the file does not exist.

Jump to

Keyboard shortcuts

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