1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
use *;
/// The root hook lanes as `--skip` tokens, in the order a run passes
/// through them.
///
/// One token per lane, accepted identically by `anodizer release` and
/// `anodizer build`, and honored at every site that fires a lane — the root
/// block, the per-crate `crates[].before:` / `crates[].after:` blocks, and
/// the per-publisher `publish.on_error:` blocks — so one flag suppresses a
/// lane everywhere it can fire.
///
/// Tokens are kebab-case like the rest of the vocabulary, so the `on_error:`
/// block's token is `on-error`, the same shape `before_publish:` →
/// `--skip=before-publish` already uses.
///
/// `always:` is skippable deliberately. It is the run's `finally`, but
/// `--skip` is the operator's per-invocation escape hatch and the asymmetry
/// it removes is the genuinely incoherent state: `--skip=before` already
/// suppresses the setup lane, so with no `--skip=always` the teardown lane
/// would still fire against state that was never staged. The cost is stated
/// where the lane is documented — skipping `always:` means teardown does not
/// run, and whatever the run staged stays staged.
///
/// `anodizer build` has no `on_error:` lane (a failed local build is not a
/// failed release; it reaches `always:` with `ANODIZER_SUCCESS=false`), so
/// `--skip=on-error` has nothing to suppress there. It stays in build's
/// vocabulary anyway: the token set is published to machine consumers via
/// `anodizer vocabulary` and a caller's one skip list has to work on
/// whichever command a job runs.
pub const ROOT_HOOK_LANE_SKIPS: & = &;
/// Non-publisher `--skip` tokens for the `release` command: the pipeline
/// stage / phase names that are NOT publishers.
///
/// The publisher tokens are NOT listed here — they are derived from
/// [`PublisherKind`] and unioned in by [`VALID_RELEASE_SKIPS`], so the
/// `--skip` publisher vocabulary cannot drift from the registry. The root
/// hook lanes are not listed here either — they come from
/// [`ROOT_HOOK_LANE_SKIPS`], which `release` and `build` share. Keep ONLY
/// non-publisher, non-lane stage tokens here.
///
/// Two pairs look like publishers but are stages and belong here:
/// `snapcraft` is the snap *build* stage (its publisher sibling is
/// `snapcraft-publish`), and `release` is the GitHub/GitLab/Gitea release
/// *stage* (its publisher sibling is `github-release`).
pub const NON_PUBLISHER_RELEASE_SKIPS: & = &;
/// Valid `--skip` values for the `release` command: every root hook lane
/// token ([`ROOT_HOOK_LANE_SKIPS`]) PLUS every pipeline stage/phase token
/// (`NON_PUBLISHER_RELEASE_SKIPS`) PLUS every publisher token (derived
/// from [`PublisherKind`]).
///
/// Skip tokens are stage names plus publisher names. Every publisher's skip
/// token is its canonical [`crate::Publisher::name`] / [`PublisherKind::token`]
/// (the same token `--publishers` keys on and the same one GoReleaser's
/// `--skip` uses), so homebrew is `homebrew` and chocolatey is `chocolatey` —
/// there are no short aliases (`brew`/`choco`). This keeps one denylist
/// vocabulary across the `--skip` and `--publishers` selectors and matches
/// GoReleaser's `--skip` keys, so a single name works on both tools.
///
/// Deriving the publisher half from [`PublisherKind::iter`] is what makes the
/// vocabulary drift-proof: a newly added publisher is automatically a valid
/// `--skip` token. (This closed a real gap — nine publisher tokens
/// — `npm`, `gemfury`, `cloudsmith`, `artifactory`, `uploads`, `dockerhub`,
/// `mcp`, `schemastore`, `upstream-aur` — had silently fallen out of the old
/// hand-maintained literal.)
pub static VALID_RELEASE_SKIPS: = new;
/// One entry in anodizer's canonical `--skip` / `--publishers` vocabulary,
/// emitted by `anodizer vocabulary` for machine consumers (the GitHub Action
/// derives its skip / publisher token sets from this instead of re-deriving
/// them in shell).
///
/// `is_publisher` marks the publisher tokens (the half of the vocabulary that
/// `--publishers` also accepts); `is_publish_stage` mirrors
/// [`PublisherKind::is_publish_stage`] for those, and is always `false` for
/// the non-publisher pipeline-stage tokens.
/// The full canonical `--skip` / `--publishers` vocabulary as structured
/// entries, derived entirely from [`ROOT_HOOK_LANE_SKIPS`],
/// `NON_PUBLISHER_RELEASE_SKIPS` and [`PublisherKind::iter`] — no
/// hand-maintained list. Adding a publisher variant, a hook lane, or a
/// non-publisher stage token updates this automatically.
///
/// The set of [`ReleaseToken::token`] values equals [`VALID_RELEASE_SKIPS`]
/// exactly (enforced by a by-construction test), so anodizer and its
/// consumers can never disagree on the legal token set.
/// Non-lane `--skip` tokens for the `build` command: the gates `build`'s own
/// code consults.
///
/// `build` runs a fixed stage list rather than the release pipeline, so its
/// vocabulary is deliberately narrow — a token here must name something
/// `anodizer build` actually reads (`validate` gates config / git validation,
/// `sign` gates the binary-sign stage, `notarize` gates notarization).
const NON_LANE_BUILD_SKIPS: & = &;
/// Valid `--skip` values for the `build` command: every root hook lane token
/// ([`ROOT_HOOK_LANE_SKIPS`]) PLUS the build-specific gates
/// (`NON_LANE_BUILD_SKIPS`).
///
/// The lane half is shared verbatim with [`VALID_RELEASE_SKIPS`] so a caller
/// holding one skip list can hand it to either command.
pub static VALID_BUILD_SKIPS: = new;
/// Validate that all skip values are in the allowed set.
///
/// Returns `Ok(())` if all values are valid, or `Err` with a descriptive
/// message listing the invalid value(s) and the full set of valid options.
/// Collect an iterator of string slices, dropping later duplicates while keeping
/// first-seen order — used so the `--skip` error hint lists each valid token
/// once even though its source set unions overlapping vocabularies.