feat(ui): print releaser name and version header on every run
ci / vet, staticcheck, test, build (push) Successful in 3m28s

Adds a logHeader() helper that prints "releaser  v<version>" to stderr
at the start of every invocation, before any other output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 11:53:22 +02:00
parent 153d65bc53
commit 6984fcc547
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -205,6 +205,8 @@ func initConfig(absRepo string) error {
} }
func run(o options) error { func run(o options) error {
logHeader(version)
// --- Config --- // --- Config ---
absRepo, err := filepath.Abs(o.repoPath) absRepo, err := filepath.Abs(o.repoPath)
if err != nil { if err != nil {
+7
View File
@@ -49,6 +49,13 @@ func logWarn(format string, args ...any) {
fmt.Fprintf(os.Stderr, " %s %s\n", paint(ansiYellow, "!"), msg) fmt.Fprintf(os.Stderr, " %s %s\n", paint(ansiYellow, "!"), msg)
} }
// logHeader prints the tool name and version banner to stderr.
func logHeader(ver string) {
fmt.Fprintf(os.Stderr, "%s %s\n",
paint(ansiBold, "releaser"),
paint(ansiDim, "v"+ver))
}
// logSection writes a bold section header to stderr (used in verbose mode). // logSection writes a bold section header to stderr (used in verbose mode).
func logSection(title string) { func logSection(title string) {
fmt.Fprintf(os.Stderr, "\n%s\n", paint(ansiBold, "▸ "+title)) fmt.Fprintf(os.Stderr, "\n%s\n", paint(ansiBold, "▸ "+title))