feat(motor): agregar version fijable en build y clusterlog bootstrap-instance

Primer paso hacia separar el motor (herramienta genérica) de cada
instancia (contenido de un deployment): Version deja de ser const para
poder inyectarse con -ldflags en `make build` (git describe, sin tags
aún), y el comando nuevo bootstrap-instance genera el esqueleto mínimo
de una instancia (zola.toml, content/<sección>/_index.md, admins.json
vacío, .clusterlog-version) reusando saveAdmins() en vez de duplicar su
formato. Documentado en CLI.md; el empaquetado de templates/tema y el
CI de instancia quedan para cuando el motor publique releases.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 00:06:49 -06:00
co-authored by Claude Sonnet 5
parent c06037fa3b
commit 4afb85bb9e
16 changed files with 545 additions and 2 deletions
+3 -1
View File
@@ -2,6 +2,8 @@ SHELL := /usr/bin/env bash
GO ?= go
ZOLA ?= zola
BINARY ?= bin/clusterlog
CLUSTERLOG_VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -X example.org/bitacora-cluster/internal/clusterlog.Version=$(CLUSTERLOG_VERSION)
.PHONY: all build test vet e2e theme sync sync-check validate validate-local site serve smoke ci clean runme-install runme-list runme-check runme-ci
@@ -9,7 +11,7 @@ all: build
build:
mkdir -p $(dir $(BINARY))
$(GO) build -trimpath -o $(BINARY) ./cmd/clusterlog
$(GO) build -trimpath -ldflags "$(LDFLAGS)" -o $(BINARY) ./cmd/clusterlog
test:
$(GO) test ./...