Support full-tag prepared CI delivery

This commit is contained in:
2026-10-10 03:40:10 +00:00
parent f837871b77
commit c0cc50b127
11 changed files with 272 additions and 55 deletions

View File

@@ -212,24 +212,31 @@ known missing assets are added. See the
Prepare a tagged CI checkout and deliver it:
```sh
releasekit ci-deliver [--repo DIR] [--config FILE] [--remote NAME] --commit OID VERSION
releasekit ci-deliver [--repo DIR] [--config FILE] [--remote NAME] [--prepared] [--expected-module DIR] --commit OID TAG
```
`ci-deliver` fetches `VERSION` from the selected Git remote (default `origin`),
requires the tag's peeled commit to match the required full `--commit` object
ID, and checks out that commit detached. It then loads the profile from the
prepared checkout, validates delivery settings and the configured token, and
downloads application dependencies only when the profile selects build targets.
Binary profiles are built and delivered through the same facade path as
`deliver`; source-only profiles skip dependency downloads and binary builds.
`TAG` is the complete Git tag name, including any module path prefix. Its last
path component must be a stable semantic version; other commands continue to
take a semantic `VERSION`. By default, `ci-deliver` fetches the exact `TAG` from
the selected Git remote (default `origin`), requires its peeled commit to match
the required full `--commit` object ID, checks out that commit detached, then
verifies the tag, HEAD, and clean worktree. With `--prepared`, it performs those
checks read-only against the existing checkout and does not fetch or check out.
In either mode, it loads the profile from the verified source. `--expected-module`
optionally checks that the profile selects the module chosen by a launcher;
module selection itself remains profile-owned. The command validates delivery
settings and the configured token, then downloads application dependencies only
when the profile selects build targets. Binary profiles are built and delivered
through the same facade path as `deliver`; source-only profiles skip dependency
downloads and binary builds.
`--config` follows the existing profile path rules: relative paths are resolved
from `--repo`, and absolute paths are used as-is. This command explicitly
prepares and changes the selected checkout. Ordinary `deliver` continues to
operate on already prepared source without fetching, checking out, or
downloading dependencies.
from `--repo`, and absolute paths are used as-is. The default mode prepares and
changes the selected checkout; `--prepared` reuses a verified checkout.
Ordinary `deliver` continues to operate on already prepared source without
fetching, checking out, or downloading dependencies.
In Woodpecker, pass `CI_WORKSPACE`, `CI_COMMIT_SHA`, and `CI_COMMIT_TAG` as the
repository, expected commit, and version arguments. The CLI does not read
repository, expected commit, and full tag arguments. The CLI does not read
provider-specific environment variable names. Checkout and dependency
preparation failures return status 1; usage, profile, credential, and invalid
version errors return status 2. Final delivery uses the same statuses as