|
|
|
@@ -38,7 +38,12 @@ Two facts limit where enforcement can live:
|
|
|
|
|
landed on `main`, never a feature-branch commit. An `apm.yml` edit that leaves `version:` alone
|
|
|
|
|
does not start a new run.
|
|
|
|
|
- **Immutability.** Tags are never moved, overwritten or silently re-cut. A tag that is lightweight
|
|
|
|
|
or that peels to the wrong commit is reported as an error for a human to resolve.
|
|
|
|
|
or that peels to no landing of its version is reported as an error for a human to resolve.
|
|
|
|
|
- **A version is released once, at its first landing.** When a version comes back (a reverted
|
|
|
|
|
bump, or an `apm.yml` deleted and re-added), the later run is not tagged again: its tag already
|
|
|
|
|
exists on the earlier run, so the script reports that run `RELEASED` and it blocks nothing. An
|
|
|
|
|
untagged version that recurs within the wanted runs is tagged at its first landing there, and
|
|
|
|
|
the later runs report `RELEASED`.
|
|
|
|
|
- **Mechanism.** `scripts/tag-plugin-releases.sh` computes the targets from `origin/main`'s
|
|
|
|
|
history and cuts the tags after merge. Without arguments it is a dry run: it prints a
|
|
|
|
|
`plugin version commit status` table and exits 1 if any tag is missing. `--apply` creates the
|
|
|
|
@@ -46,25 +51,31 @@ Two facts limit where enforcement can live:
|
|
|
|
|
exact `git push origin <tag>…` line, naming each tag explicitly and never using `--tags`. The
|
|
|
|
|
script never fetches and never pushes. No hook gates any of this.
|
|
|
|
|
- **Which versions are wanted.** If a plugin already has a `<plugin>-v*` tag reachable from
|
|
|
|
|
`main`, the script wants every version run from the newest such tag onward. If it has none, the
|
|
|
|
|
script wants only the current run. That second rule is the backfill: older history is not
|
|
|
|
|
`main`, the script wants every version run from the newest such tag onward, including a reverted
|
|
|
|
|
version's run, which then reports `RELEASED` as above. If it has none, the script wants only the
|
|
|
|
|
current run. That second rule is the backfill: older history is not
|
|
|
|
|
tagged retroactively.
|
|
|
|
|
- **One deliberate exception to the backfill: git's previous version, `git-v1.3.8`, is also
|
|
|
|
|
tagged**, on `32fbe39fb8923854ca8e743a0d2cad81720c736c`, where 1.3.8 first landed on `main`. This
|
|
|
|
|
gives a consumer pinned to an older git tag something real to check `apm outdated` against. It is
|
|
|
|
|
a one-off, cut by hand or with `--ref`. After it, the "from the newest tag onward" rule covers
|
|
|
|
|
git like every other plugin.
|
|
|
|
|
a one-off, cut with exactly
|
|
|
|
|
`scripts/tag-plugin-releases.sh --ref 32fbe39fb8923854ca8e743a0d2cad81720c736c --plugin git --apply`,
|
|
|
|
|
which tags git alone; without `--plugin git` that `--ref` would tag every plugin's version at
|
|
|
|
|
that commit. After it, the "from the newest tag onward" rule covers git like every other plugin.
|
|
|
|
|
- **Pushing a release tag is a maintainer-only action. It is not a Propose-tier push under
|
|
|
|
|
ADR-0032.** ADR-0032's Propose tier ("branch, commit, push, open a PR, comment") covers pushes
|
|
|
|
|
that propose a change for review: a human still approves the change before it merges. A tag push
|
|
|
|
|
has no review step behind it. It publishes a release that consumers pin, and because tags are
|
|
|
|
|
immutable it cannot be quietly taken back. An agent may run the dry run, and may run `--apply`
|
|
|
|
|
only when a maintainer asks it to. The push itself is always the maintainer's.
|
|
|
|
|
locally once a version bump has merged. It then shows the maintainer the push command the
|
|
|
|
|
script printed and waits; the push itself is always the maintainer's.
|
|
|
|
|
- **Agents cut release tags only with the script.** Cutting one by hand or with Gitea's
|
|
|
|
|
`create_tag` (consequence 4) is a maintainer path.
|
|
|
|
|
- **Wiring elsewhere:**
|
|
|
|
|
- Root `apm.yml`'s `marketplace.build.tagPattern` is `{name}-v{version}`.
|
|
|
|
|
- `docs/agents/delivery.md` lists the script's dry run under Conventions as a post-merge check.
|
|
|
|
|
It does not go under Post-merge checks, because that section accepts only forge status names
|
|
|
|
|
and the repo has no CI.
|
|
|
|
|
- `docs/agents/delivery.md` points at `AGENTS.md` and this ADR under Conventions. The dry run
|
|
|
|
|
does not go under Post-merge checks, because that section accepts only forge status names and
|
|
|
|
|
the repo has no CI.
|
|
|
|
|
- `AGENTS.md` carries the agent-facing rule and cites this ADR.
|
|
|
|
|
|
|
|
|
|
## Considered options
|
|
|
|
@@ -126,9 +137,9 @@ rewrites it. **It is untested.**
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**4. Gitea's `create_tag` is an equivalent way to cut a tag**, provided `git cat-file -t <tag>`
|
|
|
|
|
reports `tag` after fetching. That confirms it is annotated; the script reports a lightweight tag
|
|
|
|
|
as an error.
|
|
|
|
|
**4. For a maintainer, Gitea's `create_tag` is an equivalent way to cut a tag**, provided
|
|
|
|
|
`git cat-file -t <tag>` reports `tag` after fetching. That confirms it is annotated; the script
|
|
|
|
|
reports a lightweight tag as an error.
|
|
|
|
|
|
|
|
|
|
**5. Enforcement is by convention for now.** Nothing fails when a maintainer forgets to tag. A
|
|
|
|
|
`post-merge:` assertion that the verify stage checks on version-bump PRs is the natural next step
|
|
|
|
|