Documentation
¶
Overview ¶
Package release tracks which version of jaira last prepared a board, and carries the change notes a user reads when a newer binary catches up an older one.
The notes are never copied to disk anywhere: a copy can drift from the binary that reads it, but the binary always knows what is in itself. So the notes are embedded with go:embed and read straight out of the executable.
They come from two places. NOTES.md holds every release up to 0.3.6 as fixed history. Every change since is a file of its own under notes/, named after its ticket, so two branches never edit the same lines. A file directly in notes/ is Unreleased; releasing moves every one of them into notes/<version>/ (see Cut), and the folder's name is the release.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Current = "dev"
Current is the version of the running binary. It is a package-level var, set once by cli.Execute, because the TUI also creates boards and plumbing a version string through the whole TUI to stamp one file is not worth it.
Functions ¶
func Cut ¶ added in v0.3.7
Cut releases every note file directly in <pkgDir>/notes by moving it into <pkgDir>/notes/<version>/, and returns the version it used. A leading "v" is dropped, so "v0.3.7" and "0.3.7" cut the same release. It refuses a version that is not X.Y.Z, a release that already has a folder, and a release with no notes: that one would be a pull request without a commit.
The release workflow (.github/workflows/release-notes.yaml) runs it on a branch of its own; nothing here touches git.
Types ¶
type Entry ¶
Entry is one release's worth of change notes.
func Notes ¶
func Notes() []Entry
Notes returns the embedded release notes, newest release first: the note files directly in notes/ as Unreleased, then one release per notes/<version>/ folder, then the fixed history in NOTES.md.
func Since ¶
Since returns the entries newer than stamped, selecting by position in the notes file rather than by parsing version numbers. A stamp that appears nowhere in the file — empty, "dev", a snapshot build, or a version older than the oldest entry — cannot be reasoned about any other way, so it selects everything. Showing too much on an unknown stamp is the safe direction; showing too little is not.
Directories
¶
| Path | Synopsis |
|---|---|
|
Command cut releases the notes: it moves every file directly in core/release/notes into core/release/notes/<version>/ and prints the version.
|
Command cut releases the notes: it moves every file directly in core/release/notes into core/release/notes/<version>/ and prints the version. |