Deliver module releases to full-tag pages
This commit is contained in:
@@ -7,6 +7,13 @@ The operation accepts historical lightweight and annotated tags, including a
|
||||
detached checkout, when the checked-out `HEAD` identifies the selected tag
|
||||
commit. It does not require the old remote `main` to match.
|
||||
|
||||
Delivery resolves the selected module's declaration and release note from the
|
||||
captured commit. `Version` remains the semantic version; the full tag includes
|
||||
the selected module's repository-relative physical path when it is nested. The
|
||||
profile or API request selects the physical module directory. The optional API
|
||||
`ExpectedTag` checks that a CI event's literal tag agrees with the derived tag
|
||||
before any build or hosted request.
|
||||
|
||||
## CI preparation
|
||||
|
||||
Use `PrepareTaggedCheckout` when a disposable CI checkout must be verified
|
||||
@@ -66,6 +73,8 @@ The CLI reads the named token variable only for `deliver`; its default name is
|
||||
creating or accepting a hosted release page. The full checked-in note is the
|
||||
hosted body. A retry accepts an identical page and matching attachments, adds
|
||||
only missing assets, and reports conflicts without replacing content.
|
||||
For nested modules, the note comes from that module's committed
|
||||
`docs/releases/<version>.md`, and the hosted page is keyed by its complete tag.
|
||||
|
||||
With no build targets, delivery is page-only: no builder, version smoke check,
|
||||
receipt, binary asset, or checksum manifest is involved. With selected targets,
|
||||
@@ -81,9 +90,10 @@ RELEASEKIT_GITEA_TOKEN="$GITEA_TOKEN" releasekit deliver --assets dist v1.2.3
|
||||
The build command does not need delivery credentials. The `--assets DIR`
|
||||
directory must contain the private `.releasekit-build.json` receipt created by
|
||||
`build`. ReleaseKit checks the receipt's repository, commit, version, resolved
|
||||
build settings, and file hashes before making a remote request; caller-owned
|
||||
files remain available for retries. Ordinary `deliver` does not download
|
||||
application dependencies or change the checkout.
|
||||
module directory and path, full tag, build settings, and file hashes before
|
||||
making a remote request; caller-owned files remain available for retries.
|
||||
Ordinary `deliver` does not download application dependencies or change the
|
||||
checkout.
|
||||
|
||||
The result reports `complete`, `partial`, `conflict`, `unknown`, or
|
||||
`not_attempted`, along with matching, uploaded, pending, conflicting, and
|
||||
@@ -110,19 +120,23 @@ outside the checkout and removed when delivery returns. `Output` receives build
|
||||
progress. With no build, or with an empty target set, delivery is page-only.
|
||||
|
||||
To deliver binaries built separately, set `Prebuilt` to the `BuildResult`.
|
||||
ReleaseKit checks that it identifies the selected repository, tagged commit, and
|
||||
version, that its source was verified clean and unchanged during compilation,
|
||||
and that the current files still match their recorded digests. The files remain
|
||||
caller-owned, so callers can retain the original bytes for retries and are
|
||||
responsible for cleanup. With neither artifact source, an empty managed target
|
||||
set, or an empty prebuilt result, delivery is page-only. Do not set both `Build`
|
||||
and `Prebuilt` in one request.
|
||||
ReleaseKit checks its repository, module directory, declared module path, full
|
||||
tag, semantic version, tagged commit, normalized settings, and artifact evidence
|
||||
against the selected committed module. Binary results must record verified
|
||||
source. The current files are checked against their recorded digests before any
|
||||
hosted request. The files remain caller-owned, so callers can retain the
|
||||
original bytes for retries and are responsible for cleanup. With neither
|
||||
artifact source, an empty managed target set, or a matching empty prebuilt
|
||||
result, delivery is page-only. Do not set both `Build` and `Prebuilt` in one
|
||||
request.
|
||||
|
||||
```go
|
||||
result, err := releasekit.Deliver(ctx, releasekit.DeliveryRequest{
|
||||
RepositoryDir: "/work/example",
|
||||
ModuleDir: "integrations/example",
|
||||
Product: "Example",
|
||||
Version: "v1.2.3",
|
||||
ExpectedTag: "integrations/example/v1.2.3", // optional CI event check
|
||||
Destination: releasekit.GiteaDestination{
|
||||
BaseURL: "https://gitea.example",
|
||||
Owner: "example",
|
||||
|
||||
Reference in New Issue
Block a user