configcmd and version: the config and version standard commands; darwin /var/run

core/configcmd: "<program> config create|validate|upgrade|path" from a
Spec (name, application, minimal/full templates, Validate, Schema),
taken over from yamase-core/pkg/configcmd and generalized: Filename,
Optional (programs that run on defaults) and None (no configuration).

core/version: "<program> version [--json]" over the values each
program stamps into its internal/version; JSON keys match yasta's
existing output (yavebu reads it), VCS fallback for unstamped builds.

paths: macOS CLI/Service system-scope RuntimeDir is /var/run/<app>
instead of /run/<app>, which macOS does not have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-10-23 14:36:48 +02:00
1 parent ca0f06f978
commit 90132e2d76
13 files changed
+1824 -20

No files matched your search

+9
View File
@@ -13,6 +13,15 @@ import "yetano.dev/yetano/core"
// preferences-adjacent files and its bulk data side by side); State gets
// its own subdirectory so it doesn't collide with either.
// darwinFlavor is the Linux layout CLI and Service applications use on
// macOS, except the system runtime base: macOS has no /run, its
// equivalent is /var/run.
var darwinFlavor = func() unixFlavor {
f := linuxFlavor
f.systemRuntimeBase = "/var/run"
return f
}()
func darwinAppSupportBase(scope core.Scope, home string) string {
if scope == core.SystemScope {
return "/Library/Application Support"