Files
mesh-catalog/modules/mesh-build-node/cmd/mesh-build-node/publish.go
T
jschoubben ff6a8928d6 SD5, BG11, BLD10: the build modules' shared code moves into the delivery SDK
All of mesh-build-go's buildstep Go module leaves mesh-catalog for
modules/mesh-delivery-sdk: the step run, fetch and release and the
regenerate-and-compare step as the package steprun, the CPU share as
steprun/buildcpu, the conformance kit as steprun/conformance, the seat
generator as seatgen with cmd/seatgen, and cmd/mesh-pack. The three
build modules and the builder's and checker's tests import the SDK and
keep no copy; the SDK requires nothing of mesh-catalog. Code the build
modules share is the delivery domain's SDK, not one module's package.
It carries the build-module round's two new files of that package
(dropdetected.go 247c422f, storedbuilds.go 904b8aed).

Builds: design 47 G §464, §680, §327, §420, §495

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:18:34 +01:00

30 lines
1.2 KiB
Go

package main
// The publish of a done build's file (novox/hq design 51 *Publishing*, ADR 0611; CAT-BN3): from this module's own
// process, after the build step ended, through a registry seat's verbs publish and publish-part, which the manifest
// `invokes`, with the build modules' one sender (steprun.PublishOne): a bundle's archive on oci-artifact-registry, a
// trunk package on npm-package-registry under the version the builder gave it. No build step reaches a store, and this
// module holds no write credential: the holder checks the build with the builder and says published or refused.
import (
"context"
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/steprun"
)
// publishOn publishes body, of digest, as name (at version, when it has one) of kind on seat: through Call when a
// test set it, else the runtime's request over the bus (stdio.Ask).
func (m *Module) publishOn(ctx context.Context, seat, name, kind, version, digest string, body []byte) error {
call := m.Call
if call == nil {
call = stdio.Ask
}
q := kind
if version != "" {
q = "v" + version
}
return steprun.PublishOne(ctx, call, seat, name, kind, version, digest, steprun.TransferName(name, q, digest), body)
}