@ferrflow/doc 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs-en/ci/github-actions.md +120 -0
- package/docs-en/ci/gitlab-ci.md +90 -0
- package/docs-en/ci/hosted-bot.md +82 -0
- package/docs-en/ci/pipeline-triggers.md +287 -0
- package/docs-en/configuration/config-file.md +1259 -0
- package/docs-en/configuration/formats.md +220 -0
- package/docs-en/configuration/monorepo.md +390 -0
- package/docs-en/installation.md +56 -0
- package/docs-en/introduction.md +56 -0
- package/docs-en/quickstart.md +66 -0
- package/docs-en/reference/api.md +106 -0
- package/docs-en/reference/cli.md +483 -0
- package/docs-en/reference/conventional-commits.md +103 -0
- package/docs-en/reference/errors.md +508 -0
- package/docs-en/verifying-releases.md +97 -0
- package/docs-fr/ci/github-actions.md +109 -0
- package/docs-fr/ci/gitlab-ci.md +77 -0
- package/docs-fr/ci/hosted-bot.md +82 -0
- package/docs-fr/ci/pipeline-triggers.md +238 -0
- package/docs-fr/configuration/config-file.md +839 -0
- package/docs-fr/configuration/formats.md +163 -0
- package/docs-fr/configuration/monorepo.md +357 -0
- package/docs-fr/installation.md +56 -0
- package/docs-fr/introduction.md +54 -0
- package/docs-fr/quickstart.md +63 -0
- package/docs-fr/reference/api.md +106 -0
- package/docs-fr/reference/cli.md +407 -0
- package/docs-fr/reference/conventional-commits.md +103 -0
- package/docs-fr/reference/errors.md +378 -0
- package/docs-fr/verifying-releases.md +97 -0
- package/docs-fr-v4/ci/github-actions.md +106 -0
- package/docs-fr-v4/ci/gitlab-ci.md +77 -0
- package/docs-fr-v4/ci/pipeline-triggers.md +214 -0
- package/docs-fr-v4/configuration/config-file.md +769 -0
- package/docs-fr-v4/configuration/formats.md +128 -0
- package/docs-fr-v4/configuration/monorepo.md +324 -0
- package/docs-fr-v4/installation.md +48 -0
- package/docs-fr-v4/introduction.md +54 -0
- package/docs-fr-v4/legal/telemetry.md +65 -0
- package/docs-fr-v4/quickstart.md +63 -0
- package/docs-fr-v4/reference/cli.md +130 -0
- package/docs-fr-v4/reference/conventional-commits.md +67 -0
- package/docs-fr-v4/reference/errors.md +372 -0
- package/docs-fr-v5/ci/github-actions.md +109 -0
- package/docs-fr-v5/ci/gitlab-ci.md +77 -0
- package/docs-fr-v5/ci/hosted-bot.md +82 -0
- package/docs-fr-v5/ci/pipeline-triggers.md +238 -0
- package/docs-fr-v5/configuration/config-file.md +812 -0
- package/docs-fr-v5/configuration/formats.md +150 -0
- package/docs-fr-v5/configuration/monorepo.md +357 -0
- package/docs-fr-v5/installation.md +56 -0
- package/docs-fr-v5/introduction.md +54 -0
- package/docs-fr-v5/legal/telemetry.md +26 -0
- package/docs-fr-v5/quickstart.md +63 -0
- package/docs-fr-v5/reference/api.md +106 -0
- package/docs-fr-v5/reference/cli.md +356 -0
- package/docs-fr-v5/reference/conventional-commits.md +88 -0
- package/docs-fr-v5/reference/errors.md +378 -0
- package/docs-fr-v5/verifying-releases.md +97 -0
- package/docs-fr-v6/ci/github-actions.md +109 -0
- package/docs-fr-v6/ci/gitlab-ci.md +77 -0
- package/docs-fr-v6/ci/hosted-bot.md +82 -0
- package/docs-fr-v6/ci/pipeline-triggers.md +238 -0
- package/docs-fr-v6/configuration/config-file.md +813 -0
- package/docs-fr-v6/configuration/formats.md +150 -0
- package/docs-fr-v6/configuration/monorepo.md +357 -0
- package/docs-fr-v6/installation.md +56 -0
- package/docs-fr-v6/introduction.md +54 -0
- package/docs-fr-v6/quickstart.md +63 -0
- package/docs-fr-v6/reference/api.md +106 -0
- package/docs-fr-v6/reference/cli.md +356 -0
- package/docs-fr-v6/reference/conventional-commits.md +88 -0
- package/docs-fr-v6/reference/errors.md +378 -0
- package/docs-fr-v6/verifying-releases.md +97 -0
- package/docs-v0/ci/github-actions.md +77 -0
- package/docs-v0/ci/gitlab-ci.md +59 -0
- package/docs-v0/configuration/config-file.md +97 -0
- package/docs-v0/configuration/formats.md +86 -0
- package/docs-v0/configuration/monorepo.md +59 -0
- package/docs-v0/installation.md +48 -0
- package/docs-v0/introduction.md +34 -0
- package/docs-v0/legal/telemetry.md +63 -0
- package/docs-v0/quickstart.md +58 -0
- package/docs-v0/reference/cli.md +95 -0
- package/docs-v0/reference/conventional-commits.md +68 -0
- package/docs-v1/ci/github-actions.md +76 -0
- package/docs-v1/ci/gitlab-ci.md +58 -0
- package/docs-v1/configuration/config-file.md +515 -0
- package/docs-v1/configuration/formats.md +115 -0
- package/docs-v1/configuration/monorepo.md +246 -0
- package/docs-v1/installation.md +48 -0
- package/docs-v1/introduction.md +39 -0
- package/docs-v1/legal/telemetry.md +63 -0
- package/docs-v1/quickstart.md +62 -0
- package/docs-v1/reference/cli.md +128 -0
- package/docs-v1/reference/conventional-commits.md +67 -0
- package/docs-v2/ci/github-actions.md +117 -0
- package/docs-v2/ci/gitlab-ci.md +90 -0
- package/docs-v2/ci/pipeline-triggers.md +263 -0
- package/docs-v2/configuration/config-file.md +806 -0
- package/docs-v2/configuration/formats.md +98 -0
- package/docs-v2/configuration/monorepo.md +324 -0
- package/docs-v2/installation.md +48 -0
- package/docs-v2/introduction.md +40 -0
- package/docs-v2/legal/telemetry.md +66 -0
- package/docs-v2/quickstart.md +63 -0
- package/docs-v2/reference/cli.md +130 -0
- package/docs-v2/reference/conventional-commits.md +67 -0
- package/docs-v2/reference/errors.md +500 -0
- package/docs-v2/self-hosting.md +101 -0
- package/docs-v3/ci/github-actions.md +117 -0
- package/docs-v3/ci/gitlab-ci.md +90 -0
- package/docs-v3/ci/pipeline-triggers.md +263 -0
- package/docs-v3/configuration/config-file.md +806 -0
- package/docs-v3/configuration/formats.md +99 -0
- package/docs-v3/configuration/monorepo.md +324 -0
- package/docs-v3/installation.md +48 -0
- package/docs-v3/introduction.md +40 -0
- package/docs-v3/legal/telemetry.md +66 -0
- package/docs-v3/quickstart.md +66 -0
- package/docs-v3/reference/cli.md +161 -0
- package/docs-v3/reference/conventional-commits.md +67 -0
- package/docs-v3/reference/errors.md +502 -0
- package/docs-v3/self-hosting.md +137 -0
- package/docs-v4/ci/github-actions.md +117 -0
- package/docs-v4/ci/gitlab-ci.md +90 -0
- package/docs-v4/ci/pipeline-triggers.md +263 -0
- package/docs-v4/configuration/config-file.md +850 -0
- package/docs-v4/configuration/formats.md +182 -0
- package/docs-v4/configuration/monorepo.md +324 -0
- package/docs-v4/installation.md +48 -0
- package/docs-v4/introduction.md +56 -0
- package/docs-v4/legal/telemetry.md +65 -0
- package/docs-v4/quickstart.md +66 -0
- package/docs-v4/reference/cli.md +161 -0
- package/docs-v4/reference/conventional-commits.md +67 -0
- package/docs-v4/reference/errors.md +502 -0
- package/docs-v4/self-hosting.md +137 -0
- package/docs-v5/ci/github-actions.md +120 -0
- package/docs-v5/ci/gitlab-ci.md +90 -0
- package/docs-v5/ci/hosted-bot.md +82 -0
- package/docs-v5/ci/pipeline-triggers.md +287 -0
- package/docs-v5/configuration/config-file.md +1133 -0
- package/docs-v5/configuration/formats.md +206 -0
- package/docs-v5/configuration/monorepo.md +390 -0
- package/docs-v5/installation.md +56 -0
- package/docs-v5/introduction.md +56 -0
- package/docs-v5/legal/telemetry.md +26 -0
- package/docs-v5/quickstart.md +66 -0
- package/docs-v5/reference/api.md +106 -0
- package/docs-v5/reference/cli.md +431 -0
- package/docs-v5/reference/conventional-commits.md +88 -0
- package/docs-v5/reference/errors.md +508 -0
- package/docs-v5/verifying-releases.md +97 -0
- package/docs-v6/ci/github-actions.md +120 -0
- package/docs-v6/ci/gitlab-ci.md +90 -0
- package/docs-v6/ci/hosted-bot.md +82 -0
- package/docs-v6/ci/pipeline-triggers.md +287 -0
- package/docs-v6/configuration/config-file.md +1134 -0
- package/docs-v6/configuration/formats.md +206 -0
- package/docs-v6/configuration/monorepo.md +390 -0
- package/docs-v6/installation.md +56 -0
- package/docs-v6/introduction.md +56 -0
- package/docs-v6/quickstart.md +66 -0
- package/docs-v6/reference/api.md +106 -0
- package/docs-v6/reference/cli.md +431 -0
- package/docs-v6/reference/conventional-commits.md +88 -0
- package/docs-v6/reference/errors.md +508 -0
- package/docs-v6/verifying-releases.md +97 -0
- package/package.json +17 -0
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
description: Complete reference for the FerrFlow configuration file.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
FerrFlow supports six config file formats, searched in this order:
|
|
7
|
+
|
|
8
|
+
1. `ferrflow.json`
|
|
9
|
+
2. `ferrflow.json5`
|
|
10
|
+
3. `ferrflow.toml`
|
|
11
|
+
4. `ferrflow.ts` (requires `tsx`)
|
|
12
|
+
5. `ferrflow.js` (requires `node`)
|
|
13
|
+
6. `.ferrflow` (JSON)
|
|
14
|
+
|
|
15
|
+
If no config file is found, FerrFlow auto-detects common version files in the current directory.
|
|
16
|
+
|
|
17
|
+
<aside class="ferr-aside ferr-aside--tip"><div class="ferr-aside__body"><p>Add <code>"$schema": "https://ferrflow.com/schema/ferrflow.json"</code> to your JSON config for editor autocompletion and validation.</p>
|
|
18
|
+
</div></aside>
|
|
19
|
+
|
|
20
|
+
## Config formats
|
|
21
|
+
|
|
22
|
+
<div class="ferr-tabs">
|
|
23
|
+
<div class="ferr-tab" data-label="TypeScript"><p class="ferr-tab__label">TypeScript</p><div class="ferr-tab__body"><pre><code class="language-ts">export default {
|
|
24
|
+
workspace: {
|
|
25
|
+
tagTemplate: "v{version}",
|
|
26
|
+
},
|
|
27
|
+
package: [
|
|
28
|
+
{
|
|
29
|
+
name: "my-app",
|
|
30
|
+
path: ".",
|
|
31
|
+
changelog: "CHANGELOG.md",
|
|
32
|
+
versionedFiles: [
|
|
33
|
+
{ path: "Cargo.toml", format: "toml" },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
</code></pre>
|
|
39
|
+
</div></div>
|
|
40
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
41
|
+
"$schema": "https://ferrflow.com/schema/ferrflow.json",
|
|
42
|
+
"workspace": {
|
|
43
|
+
"tagTemplate": "v{version}"
|
|
44
|
+
},
|
|
45
|
+
"package": [
|
|
46
|
+
{
|
|
47
|
+
"name": "my-app",
|
|
48
|
+
"path": ".",
|
|
49
|
+
"changelog": "CHANGELOG.md",
|
|
50
|
+
"versionedFiles": [
|
|
51
|
+
{ "path": "Cargo.toml", "format": "toml" }
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
</code></pre>
|
|
57
|
+
</div></div>
|
|
58
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
59
|
+
tag_template = "v{version}"
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "my-app"
|
|
63
|
+
path = "."
|
|
64
|
+
changelog = "CHANGELOG.md"
|
|
65
|
+
|
|
66
|
+
[[package.versioned_files]]
|
|
67
|
+
path = "Cargo.toml"
|
|
68
|
+
format = "toml"
|
|
69
|
+
</code></pre>
|
|
70
|
+
</div></div>
|
|
71
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
72
|
+
$schema: "https://ferrflow.com/schema/ferrflow.json",
|
|
73
|
+
workspace: {
|
|
74
|
+
tagTemplate: "v{version}",
|
|
75
|
+
},
|
|
76
|
+
package: [
|
|
77
|
+
{
|
|
78
|
+
name: "my-app",
|
|
79
|
+
path: ".",
|
|
80
|
+
changelog: "CHANGELOG.md",
|
|
81
|
+
versionedFiles: [
|
|
82
|
+
{ path: "Cargo.toml", format: "toml" },
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
}
|
|
87
|
+
</code></pre>
|
|
88
|
+
</div></div>
|
|
89
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
90
|
+
tagTemplate: "v{version}"
|
|
91
|
+
|
|
92
|
+
package:
|
|
93
|
+
|
|
94
|
+
- name: my-app
|
|
95
|
+
path: "."
|
|
96
|
+
changelog: CHANGELOG.md
|
|
97
|
+
versionedFiles:
|
|
98
|
+
- path: Cargo.toml
|
|
99
|
+
format: toml
|
|
100
|
+
</code></pre>
|
|
101
|
+
|
|
102
|
+
</div></div>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<aside class="ferr-aside ferr-aside--note"><div class="ferr-aside__body"><p>JSON, JSON5, and TypeScript/JavaScript configs use <strong>camelCase</strong> keys (<code>tagTemplate</code>, <code>versionedFiles</code>).
|
|
106
|
+
TOML configs use <strong>snake_case</strong> keys (<code>tag_template</code>, <code>versioned_files</code>).
|
|
107
|
+
YAML configs support both, but <strong>camelCase</strong> is recommended for consistency with JSON.
|
|
108
|
+
All forms are equivalent.</p>
|
|
109
|
+
</div></aside>
|
|
110
|
+
|
|
111
|
+
### TypeScript and JavaScript configs
|
|
112
|
+
|
|
113
|
+
TypeScript (`.ts`) and JavaScript (`.js`) config files use a default ESM export. The export can be a plain object or an async function.
|
|
114
|
+
|
|
115
|
+
<aside class="ferr-aside ferr-aside--warning"><div class="ferr-aside__body"><p>TypeScript configs require <code>tsx</code> (<code>npm install -g tsx</code>). JavaScript configs require <code>node</code> (v18+).</p>
|
|
116
|
+
</div></aside>
|
|
117
|
+
|
|
118
|
+
The main advantage of TS/JS configs is **function hooks**. Instead of shell command strings, you can write hooks as native functions with full access to the hook context:
|
|
119
|
+
|
|
120
|
+
```ts title="ferrflow.ts"
|
|
121
|
+
export default {
|
|
122
|
+
workspace: {
|
|
123
|
+
tagTemplate: 'v{version}',
|
|
124
|
+
hooks: {
|
|
125
|
+
postPublish: async (ctx) => {
|
|
126
|
+
await fetch('https://hooks.slack.com/services/...', {
|
|
127
|
+
method: 'POST',
|
|
128
|
+
body: JSON.stringify({
|
|
129
|
+
text: `Released ${ctx.package}@${ctx.newVersion}`,
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
package: [
|
|
136
|
+
{
|
|
137
|
+
name: 'my-app',
|
|
138
|
+
path: '.',
|
|
139
|
+
versionedFiles: [{ path: 'package.json', format: 'json' }],
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Hook context object
|
|
146
|
+
|
|
147
|
+
Function hooks receive a context object with these fields:
|
|
148
|
+
|
|
149
|
+
| Field | Type | Description |
|
|
150
|
+
| -------------- | -------------- | -------------------------------------------- |
|
|
151
|
+
| `package` | string | Package name |
|
|
152
|
+
| `oldVersion` | string | Version before bump (empty on first release) |
|
|
153
|
+
| `newVersion` | string | Version after bump |
|
|
154
|
+
| `bumpType` | string | `major`, `minor`, `patch`, or `none` |
|
|
155
|
+
| `tag` | string | Full git tag name |
|
|
156
|
+
| `dryRun` | boolean | Whether `--dry-run` is set |
|
|
157
|
+
| `packagePath` | string | Absolute path to package root |
|
|
158
|
+
| `channel` | string or null | Pre-release channel name |
|
|
159
|
+
| `isPrerelease` | boolean | Whether this is a pre-release |
|
|
160
|
+
|
|
161
|
+
Shell string hooks and function hooks can be mixed in the same config. Shell strings still work in TS/JS configs.
|
|
162
|
+
|
|
163
|
+
## `workspace`
|
|
164
|
+
|
|
165
|
+
Global settings that apply to all packages.
|
|
166
|
+
|
|
167
|
+
| Field | Type | Default | Description |
|
|
168
|
+
| ----------------------- | ------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
169
|
+
| `remote` | string | `"origin"` | Git remote to push to |
|
|
170
|
+
| `branch` | string | auto-detected | Branch to push to (detected from remote HEAD) |
|
|
171
|
+
| `tagTemplate` | string | `"v{version}"` or `"{name}@v{version}"` | Tag naming pattern. Uses `{version}` and `{name}` placeholders. Defaults to `v{version}` for single-package repos and `{name}@v{version}` for monorepos. |
|
|
172
|
+
| `versioning` | string | `"semver"` | Default versioning strategy for all packages |
|
|
173
|
+
| `releaseCommitMode` | string | `"commit"` | How to handle the release commit: `"commit"`, `"pr"`, or `"none"` |
|
|
174
|
+
| `skipCi` | boolean | depends on mode | Add `[skip ci]` to release commits. Defaults to `true` when mode is `"commit"`, `false` otherwise. |
|
|
175
|
+
| `autoMergeReleases` | boolean | `true` | Enable auto-merge on release PRs (only applies when mode is `"pr"`) |
|
|
176
|
+
| `recoverMissedReleases` | boolean | `false` | When enabled, if FerrFlow finds unreleased commits spanning multiple version bumps, it creates all intermediate releases instead of jumping to the latest version |
|
|
177
|
+
| `floatingTags` | array | `[]` | Floating tag levels to create on each release: `"major"`, `"minor"`. For example, `["major"]` creates a `v1` tag that always points to the latest `v1.x.y` release. |
|
|
178
|
+
| `orphanedTagStrategy` | string | `"warn"` | How to handle tags pointing to orphaned commits after rebase + force-push: `"warn"`, `"treeHash"`, or `"message"` |
|
|
179
|
+
| `telemetry` | boolean | `true` | Send anonymous usage telemetry ([details](/v4/docs/legal/telemetry)) |
|
|
180
|
+
|
|
181
|
+
### Tag template
|
|
182
|
+
|
|
183
|
+
The `tagTemplate` field controls how git tags are named. Available placeholders:
|
|
184
|
+
|
|
185
|
+
| Placeholder | Description |
|
|
186
|
+
| ----------- | --------------------------------- |
|
|
187
|
+
| `{version}` | The version number (e.g. `1.2.3`) |
|
|
188
|
+
| `{name}` | The package name |
|
|
189
|
+
|
|
190
|
+
<div class="ferr-tabs">
|
|
191
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
192
|
+
"workspace": {
|
|
193
|
+
"tagTemplate": "v{version}"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
</code></pre>
|
|
197
|
+
</div></div>
|
|
198
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
199
|
+
tag_template = "v{version}"
|
|
200
|
+
</code></pre>
|
|
201
|
+
</div></div>
|
|
202
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
203
|
+
workspace: {
|
|
204
|
+
tagTemplate: "v{version}",
|
|
205
|
+
},
|
|
206
|
+
}
|
|
207
|
+
</code></pre>
|
|
208
|
+
</div></div>
|
|
209
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
210
|
+
tagTemplate: "v{version}"
|
|
211
|
+
</code></pre>
|
|
212
|
+
</div></div>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
For monorepos, use `{name}` to namespace tags per package:
|
|
216
|
+
|
|
217
|
+
<div class="ferr-tabs">
|
|
218
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
219
|
+
"workspace": {
|
|
220
|
+
"tagTemplate": "{name}@v{version}"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
</code></pre>
|
|
224
|
+
</div></div>
|
|
225
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
226
|
+
tag_template = "{name}@v{version}"
|
|
227
|
+
</code></pre>
|
|
228
|
+
</div></div>
|
|
229
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
230
|
+
workspace: {
|
|
231
|
+
tagTemplate: "{name}@v{version}",
|
|
232
|
+
},
|
|
233
|
+
}
|
|
234
|
+
</code></pre>
|
|
235
|
+
</div></div>
|
|
236
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
237
|
+
tagTemplate: "{name}@v{version}"
|
|
238
|
+
</code></pre>
|
|
239
|
+
</div></div>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
### Floating tags
|
|
243
|
+
|
|
244
|
+
Floating tags are version aliases that always point to the latest release matching a given level. This is useful for GitHub Actions or Docker images where users reference `v1` instead of `v1.2.3`.
|
|
245
|
+
|
|
246
|
+
<div class="ferr-tabs">
|
|
247
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
248
|
+
"workspace": {
|
|
249
|
+
"floatingTags": ["major"]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
</code></pre>
|
|
253
|
+
</div></div>
|
|
254
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
255
|
+
floating_tags = ["major"]
|
|
256
|
+
</code></pre>
|
|
257
|
+
</div></div>
|
|
258
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
259
|
+
workspace: {
|
|
260
|
+
floatingTags: ["major"],
|
|
261
|
+
},
|
|
262
|
+
}
|
|
263
|
+
</code></pre>
|
|
264
|
+
</div></div>
|
|
265
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
266
|
+
floatingTags:
|
|
267
|
+
- major
|
|
268
|
+
</code></pre>
|
|
269
|
+
</div></div>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
When releasing `v1.2.3`, FerrFlow creates or moves a `v1` tag pointing to the same commit. With `["major", "minor"]`, both `v1` and `v1.2` tags are maintained.
|
|
273
|
+
|
|
274
|
+
If a floating tag would move backward (e.g. releasing a `v1.1.0` hotfix when `v1.2.0` already exists), FerrFlow blocks the release. Use `--force` to override this check.
|
|
275
|
+
|
|
276
|
+
### Orphaned tag strategy
|
|
277
|
+
|
|
278
|
+
When a branch is rebased and force-pushed, existing tags may point to commits that are no longer part of the branch history. By default, FerrFlow warns about these orphaned tags and skips them. You can configure automatic recovery instead.
|
|
279
|
+
|
|
280
|
+
| Strategy | Behavior |
|
|
281
|
+
| ------------ | --------------------------------------------------------------------------------------------------- |
|
|
282
|
+
| `"warn"` | Log a warning identifying the orphaned tag and skip it (default) |
|
|
283
|
+
| `"treeHash"` | Attempt to find a commit on the current branch with the same file tree as the orphaned tag's commit |
|
|
284
|
+
| `"message"` | Attempt to find a commit on the current branch with the same commit message |
|
|
285
|
+
|
|
286
|
+
<div class="ferr-tabs">
|
|
287
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
288
|
+
"workspace": {
|
|
289
|
+
"orphanedTagStrategy": "treeHash"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
</code></pre>
|
|
293
|
+
</div></div>
|
|
294
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
295
|
+
orphaned_tag_strategy = "treeHash"
|
|
296
|
+
</code></pre>
|
|
297
|
+
</div></div>
|
|
298
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
299
|
+
workspace: {
|
|
300
|
+
orphanedTagStrategy: "treeHash",
|
|
301
|
+
},
|
|
302
|
+
}
|
|
303
|
+
</code></pre>
|
|
304
|
+
</div></div>
|
|
305
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
306
|
+
orphanedTagStrategy: treeHash
|
|
307
|
+
</code></pre>
|
|
308
|
+
</div></div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
`"treeHash"` is the safest recovery option — it matches commits that have identical file contents, which is typical after a rebase that doesn't modify files. Use `"message"` when rebases also change the tree (e.g. squashing commits) but preserve the original message.
|
|
312
|
+
|
|
313
|
+
If recovery fails (no matching commit found within the last 1000 commits), FerrFlow falls back to warning and skipping the tag. In that case, re-tag manually:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
git tag -f api@v1.2.0 <correct-commit>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Release commit mode
|
|
320
|
+
|
|
321
|
+
Controls how FerrFlow handles the commit that updates version files and changelogs.
|
|
322
|
+
|
|
323
|
+
| Mode | Behavior |
|
|
324
|
+
| ---------- | ------------------------------------------------------------ |
|
|
325
|
+
| `"commit"` | Commits directly to the current branch and pushes (default) |
|
|
326
|
+
| `"pr"` | Creates a `release/` branch and opens a pull request |
|
|
327
|
+
| `"none"` | Only creates tags and releases, does not commit file changes |
|
|
328
|
+
|
|
329
|
+
<div class="ferr-tabs">
|
|
330
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
331
|
+
"workspace": {
|
|
332
|
+
"releaseCommitMode": "pr",
|
|
333
|
+
"autoMergeReleases": true
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
</code></pre>
|
|
337
|
+
</div></div>
|
|
338
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
339
|
+
release_commit_mode = "pr"
|
|
340
|
+
auto_merge_releases = true
|
|
341
|
+
</code></pre>
|
|
342
|
+
</div></div>
|
|
343
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
344
|
+
workspace: {
|
|
345
|
+
releaseCommitMode: "pr",
|
|
346
|
+
autoMergeReleases: true,
|
|
347
|
+
},
|
|
348
|
+
}
|
|
349
|
+
</code></pre>
|
|
350
|
+
</div></div>
|
|
351
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
352
|
+
releaseCommitMode: pr
|
|
353
|
+
autoMergeReleases: true
|
|
354
|
+
</code></pre>
|
|
355
|
+
</div></div>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
### Versioning strategies
|
|
359
|
+
|
|
360
|
+
FerrFlow supports multiple versioning strategies, configurable at workspace or package level.
|
|
361
|
+
|
|
362
|
+
| Strategy | Format | Example progression |
|
|
363
|
+
| -------------- | ------------------- | --------------------------------------- |
|
|
364
|
+
| `semver` | `MAJOR.MINOR.PATCH` | `1.2.3` → `1.3.0` → `2.0.0` |
|
|
365
|
+
| `calver` | `YYYY.MM.PATCH` | `2026.03.0` → `2026.03.1` → `2026.04.0` |
|
|
366
|
+
| `calver-short` | `YY.MM.PATCH` | `26.03.0` → `26.03.1` |
|
|
367
|
+
| `calver-seq` | `YYYY.MM.SEQ` | `2026.03.1` → `2026.03.2` |
|
|
368
|
+
| `sequential` | `N` | `1` → `2` → `3` |
|
|
369
|
+
| `zerover` | `0.MINOR.PATCH` | `0.1.0` → `0.2.0` (never reaches 1.0) |
|
|
370
|
+
|
|
371
|
+
<div class="ferr-tabs">
|
|
372
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
373
|
+
"workspace": {
|
|
374
|
+
"versioning": "calver"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
</code></pre>
|
|
378
|
+
</div></div>
|
|
379
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
380
|
+
versioning = "calver"
|
|
381
|
+
</code></pre>
|
|
382
|
+
</div></div>
|
|
383
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
384
|
+
workspace: {
|
|
385
|
+
versioning: "calver",
|
|
386
|
+
},
|
|
387
|
+
}
|
|
388
|
+
</code></pre>
|
|
389
|
+
</div></div>
|
|
390
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
391
|
+
versioning: calver
|
|
392
|
+
</code></pre>
|
|
393
|
+
</div></div>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
## `package`
|
|
397
|
+
|
|
398
|
+
Defines a package to version. You can have one or many.
|
|
399
|
+
|
|
400
|
+
| Field | Required | Default | Description |
|
|
401
|
+
| -------------- | -------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
|
402
|
+
| `name` | yes | — | Package identifier, used in git tag prefix |
|
|
403
|
+
| `path` | yes | — | Relative path to the package directory |
|
|
404
|
+
| `changelog` | no | `{path}/CHANGELOG.md` | Path to the changelog file |
|
|
405
|
+
| `sharedPaths` | no | `[]` | Paths that trigger this package when changed |
|
|
406
|
+
| `dependsOn` | no | `[]` | Package names this package depends on. When a dependency is bumped, this package gets a patch bump automatically. |
|
|
407
|
+
| `versioning` | no | inherited from workspace | Override versioning strategy for this package |
|
|
408
|
+
| `tagTemplate` | no | inherited from workspace | Override tag template for this package |
|
|
409
|
+
| `floatingTags` | no | inherited from workspace | Override floating tags for this package |
|
|
410
|
+
|
|
411
|
+
### `versionedFiles`
|
|
412
|
+
|
|
413
|
+
Files where the version number should be updated.
|
|
414
|
+
|
|
415
|
+
<div class="ferr-tabs">
|
|
416
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
417
|
+
"package": [
|
|
418
|
+
{
|
|
419
|
+
"name": "my-app",
|
|
420
|
+
"path": ".",
|
|
421
|
+
"versionedFiles": [
|
|
422
|
+
{ "path": "Cargo.toml", "format": "toml" },
|
|
423
|
+
{ "path": "npm/package.json", "format": "json" }
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
</code></pre>
|
|
429
|
+
</div></div>
|
|
430
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[[package]]
|
|
431
|
+
name = "my-app"
|
|
432
|
+
path = "."
|
|
433
|
+
|
|
434
|
+
[[package.versioned_files]]
|
|
435
|
+
path = "Cargo.toml"
|
|
436
|
+
format = "toml"
|
|
437
|
+
|
|
438
|
+
[[package.versioned_files]]
|
|
439
|
+
path = "npm/package.json"
|
|
440
|
+
format = "json"
|
|
441
|
+
</code></pre>
|
|
442
|
+
</div></div>
|
|
443
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
444
|
+
package: [
|
|
445
|
+
{
|
|
446
|
+
name: "my-app",
|
|
447
|
+
path: ".",
|
|
448
|
+
versionedFiles: [
|
|
449
|
+
{ path: "Cargo.toml", format: "toml" },
|
|
450
|
+
{ path: "npm/package.json", format: "json" },
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
}
|
|
455
|
+
</code></pre>
|
|
456
|
+
</div></div>
|
|
457
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">package:
|
|
458
|
+
- name: my-app
|
|
459
|
+
path: "."
|
|
460
|
+
versionedFiles:
|
|
461
|
+
- path: Cargo.toml
|
|
462
|
+
format: toml
|
|
463
|
+
- path: npm/package.json
|
|
464
|
+
format: json
|
|
465
|
+
</code></pre>
|
|
466
|
+
</div></div>
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
| `format` | File | Field updated |
|
|
470
|
+
| -------- | ---------------------------------- | ------------------------------------------------- |
|
|
471
|
+
| `toml` | `Cargo.toml`, `pyproject.toml` | `[package].version` or `[project].version` |
|
|
472
|
+
| `json` | `package.json` | `version` |
|
|
473
|
+
| `xml` | `pom.xml` | First `<version>` element |
|
|
474
|
+
| `gradle` | `build.gradle`, `build.gradle.kts` | `version = "..."` |
|
|
475
|
+
| `helm` | `Chart.yaml` | `version` and `appVersion` (when present) |
|
|
476
|
+
| `gomod` | `go.mod` | No file update — version comes from git tags only |
|
|
477
|
+
| `txt` | `VERSION`, `VERSION.txt` | Entire file content replaced |
|
|
478
|
+
|
|
479
|
+
## `hooks`
|
|
480
|
+
|
|
481
|
+
Run shell commands at key points in the release lifecycle. Hooks can be defined at workspace level (defaults for all packages) or per package (overrides workspace hooks for that package).
|
|
482
|
+
|
|
483
|
+
### Lifecycle
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
calculate bump
|
|
487
|
+
↓
|
|
488
|
+
pre_bump ← validate state, check prerequisites
|
|
489
|
+
↓
|
|
490
|
+
write version files
|
|
491
|
+
↓
|
|
492
|
+
post_bump ← modify additional files based on new version
|
|
493
|
+
↓
|
|
494
|
+
generate changelog
|
|
495
|
+
↓
|
|
496
|
+
pre_commit ← review staged changes, run linters
|
|
497
|
+
↓
|
|
498
|
+
git commit + tag
|
|
499
|
+
↓
|
|
500
|
+
pre_publish ← run tests against tagged commit, build artifacts
|
|
501
|
+
↓
|
|
502
|
+
git push + create release
|
|
503
|
+
↓
|
|
504
|
+
post_publish ← push Docker images, notify Slack, publish packages
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### Configuration
|
|
508
|
+
|
|
509
|
+
<div class="ferr-tabs">
|
|
510
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
511
|
+
"workspace": {
|
|
512
|
+
"hooks": {
|
|
513
|
+
"preBump": "cargo test",
|
|
514
|
+
"postBump": "node scripts/sync-deps.js",
|
|
515
|
+
"preCommit": "cargo fmt --check",
|
|
516
|
+
"prePublish": "cargo build --release",
|
|
517
|
+
"postPublish": "make docker-push && ./scripts/notify.sh",
|
|
518
|
+
"onFailure": "abort"
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
</code></pre>
|
|
523
|
+
</div></div>
|
|
524
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[hooks]
|
|
525
|
+
pre_bump = "cargo test"
|
|
526
|
+
post_bump = "node scripts/sync-deps.js"
|
|
527
|
+
pre_commit = "cargo fmt --check"
|
|
528
|
+
pre_publish = "cargo build --release"
|
|
529
|
+
post_publish = "make docker-push && ./scripts/notify.sh"
|
|
530
|
+
on_failure = "abort"
|
|
531
|
+
</code></pre>
|
|
532
|
+
</div></div>
|
|
533
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
534
|
+
workspace: {
|
|
535
|
+
hooks: {
|
|
536
|
+
preBump: "cargo test",
|
|
537
|
+
postBump: "node scripts/sync-deps.js",
|
|
538
|
+
preCommit: "cargo fmt --check",
|
|
539
|
+
prePublish: "cargo build --release",
|
|
540
|
+
postPublish: "make docker-push && ./scripts/notify.sh",
|
|
541
|
+
onFailure: "abort",
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
}
|
|
545
|
+
</code></pre>
|
|
546
|
+
</div></div>
|
|
547
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
548
|
+
hooks:
|
|
549
|
+
preBump: cargo test
|
|
550
|
+
postBump: node scripts/sync-deps.js
|
|
551
|
+
preCommit: cargo fmt --check
|
|
552
|
+
prePublish: cargo build --release
|
|
553
|
+
postPublish: "make docker-push && ./scripts/notify.sh"
|
|
554
|
+
onFailure: abort
|
|
555
|
+
</code></pre>
|
|
556
|
+
</div></div>
|
|
557
|
+
</div>
|
|
558
|
+
|
|
559
|
+
| Field | Type | Default | Description |
|
|
560
|
+
| ------------- | ------ | --------- | ----------------------------------------------------------------------- |
|
|
561
|
+
| `preBump` | string | — | Run after bump calculation, before writing version files |
|
|
562
|
+
| `postBump` | string | — | Run after version files are written |
|
|
563
|
+
| `preCommit` | string | — | Run after changelog, before git commit |
|
|
564
|
+
| `prePublish` | string | — | Run after commit+tag, before push |
|
|
565
|
+
| `postPublish` | string | — | Run after push and release creation |
|
|
566
|
+
| `onFailure` | string | `"abort"` | `"abort"` cancels the release on failure, `"continue"` prints a warning |
|
|
567
|
+
|
|
568
|
+
### Environment variables
|
|
569
|
+
|
|
570
|
+
Every hook receives these variables:
|
|
571
|
+
|
|
572
|
+
| Variable | Description | Example |
|
|
573
|
+
| ----------------------- | -------------------------------------------- | ------------------------------ |
|
|
574
|
+
| `FERRFLOW_PACKAGE` | Package name | `api` |
|
|
575
|
+
| `FERRFLOW_OLD_VERSION` | Version before bump (empty on first release) | `1.2.3` |
|
|
576
|
+
| `FERRFLOW_NEW_VERSION` | Version after bump | `1.3.0` |
|
|
577
|
+
| `FERRFLOW_BUMP_TYPE` | `major`, `minor`, `patch`, or `none` | `minor` |
|
|
578
|
+
| `FERRFLOW_TAG` | Full git tag name | `api@v1.3.0` |
|
|
579
|
+
| `FERRFLOW_DRY_RUN` | `true` if `--dry-run` is set | `false` |
|
|
580
|
+
| `FERRFLOW_PACKAGE_PATH` | Absolute path to package root | `/home/user/repo/packages/api` |
|
|
581
|
+
|
|
582
|
+
### Per-package hooks
|
|
583
|
+
|
|
584
|
+
Package-level hooks **replace** workspace-level hooks for that package (they are not merged).
|
|
585
|
+
|
|
586
|
+
<div class="ferr-tabs">
|
|
587
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
588
|
+
"workspace": {
|
|
589
|
+
"hooks": {
|
|
590
|
+
"preBump": "echo releasing $FERRFLOW_PACKAGE",
|
|
591
|
+
"postPublish": "make notify"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"package": [
|
|
595
|
+
{
|
|
596
|
+
"name": "api",
|
|
597
|
+
"path": "packages/api",
|
|
598
|
+
"hooks": {
|
|
599
|
+
"preBump": "cargo test"
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
</code></pre>
|
|
605
|
+
</div></div>
|
|
606
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[hooks]
|
|
607
|
+
pre_bump = "echo releasing $FERRFLOW_PACKAGE"
|
|
608
|
+
post_publish = "make notify"
|
|
609
|
+
|
|
610
|
+
[[package]]
|
|
611
|
+
name = "api"
|
|
612
|
+
path = "packages/api"
|
|
613
|
+
|
|
614
|
+
[package.hooks]
|
|
615
|
+
pre_bump = "cargo test"
|
|
616
|
+
</code></pre>
|
|
617
|
+
</div></div>
|
|
618
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
619
|
+
workspace: {
|
|
620
|
+
hooks: {
|
|
621
|
+
preBump: "echo releasing $FERRFLOW_PACKAGE",
|
|
622
|
+
postPublish: "make notify",
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
package: [
|
|
626
|
+
{
|
|
627
|
+
name: "api",
|
|
628
|
+
path: "packages/api",
|
|
629
|
+
hooks: {
|
|
630
|
+
preBump: "cargo test",
|
|
631
|
+
},
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
}
|
|
635
|
+
</code></pre>
|
|
636
|
+
</div></div>
|
|
637
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
638
|
+
hooks:
|
|
639
|
+
preBump: "echo releasing $FERRFLOW_PACKAGE"
|
|
640
|
+
postPublish: make notify
|
|
641
|
+
|
|
642
|
+
package:
|
|
643
|
+
|
|
644
|
+
- name: api
|
|
645
|
+
path: packages/api
|
|
646
|
+
hooks:
|
|
647
|
+
preBump: cargo test
|
|
648
|
+
</code></pre>
|
|
649
|
+
|
|
650
|
+
</div></div>
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
In this example, the `api` package runs `cargo test` for `preBump` (overriding the workspace echo) but inherits the workspace `postPublish` hook.
|
|
654
|
+
|
|
655
|
+
### Behavior
|
|
656
|
+
|
|
657
|
+
- **`--dry-run`**: hooks are printed but not executed.
|
|
658
|
+
- **`--verbose`**: hook stdout/stderr is streamed live. Otherwise output is only shown on failure.
|
|
659
|
+
- Files modified by `postBump` or `preCommit` hooks are automatically included in the release commit.
|
|
660
|
+
|
|
661
|
+
## Complete examples
|
|
662
|
+
|
|
663
|
+
### Single repo
|
|
664
|
+
|
|
665
|
+
<div class="ferr-tabs">
|
|
666
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
667
|
+
"$schema": "https://ferrflow.com/schema/ferrflow.json",
|
|
668
|
+
"workspace": {
|
|
669
|
+
"tagTemplate": "v{version}"
|
|
670
|
+
},
|
|
671
|
+
"package": [
|
|
672
|
+
{
|
|
673
|
+
"name": "ferrflow",
|
|
674
|
+
"path": ".",
|
|
675
|
+
"changelog": "CHANGELOG.md",
|
|
676
|
+
"versionedFiles": [
|
|
677
|
+
{ "path": "Cargo.toml", "format": "toml" },
|
|
678
|
+
{ "path": "npm/package.json", "format": "json" }
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
</code></pre>
|
|
684
|
+
</div></div>
|
|
685
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
686
|
+
tag_template = "v{version}"
|
|
687
|
+
|
|
688
|
+
[[package]]
|
|
689
|
+
name = "ferrflow"
|
|
690
|
+
path = "."
|
|
691
|
+
changelog = "CHANGELOG.md"
|
|
692
|
+
|
|
693
|
+
[[package.versioned_files]]
|
|
694
|
+
path = "Cargo.toml"
|
|
695
|
+
format = "toml"
|
|
696
|
+
|
|
697
|
+
[[package.versioned_files]]
|
|
698
|
+
path = "npm/package.json"
|
|
699
|
+
format = "json"
|
|
700
|
+
</code></pre>
|
|
701
|
+
</div></div>
|
|
702
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
703
|
+
$schema: "https://ferrflow.com/schema/ferrflow.json",
|
|
704
|
+
workspace: {
|
|
705
|
+
tagTemplate: "v{version}",
|
|
706
|
+
},
|
|
707
|
+
package: [
|
|
708
|
+
{
|
|
709
|
+
name: "ferrflow",
|
|
710
|
+
path: ".",
|
|
711
|
+
changelog: "CHANGELOG.md",
|
|
712
|
+
versionedFiles: [
|
|
713
|
+
{ path: "Cargo.toml", format: "toml" },
|
|
714
|
+
{ path: "npm/package.json", format: "json" },
|
|
715
|
+
],
|
|
716
|
+
},
|
|
717
|
+
],
|
|
718
|
+
}
|
|
719
|
+
</code></pre>
|
|
720
|
+
</div></div>
|
|
721
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
722
|
+
tagTemplate: "v{version}"
|
|
723
|
+
|
|
724
|
+
package:
|
|
725
|
+
|
|
726
|
+
- name: ferrflow
|
|
727
|
+
path: "."
|
|
728
|
+
changelog: CHANGELOG.md
|
|
729
|
+
versionedFiles:
|
|
730
|
+
- path: Cargo.toml
|
|
731
|
+
format: toml
|
|
732
|
+
- path: npm/package.json
|
|
733
|
+
format: json
|
|
734
|
+
</code></pre>
|
|
735
|
+
|
|
736
|
+
</div></div>
|
|
737
|
+
</div>
|
|
738
|
+
|
|
739
|
+
### Monorepo
|
|
740
|
+
|
|
741
|
+
<div class="ferr-tabs">
|
|
742
|
+
<div class="ferr-tab" data-label="JSON"><p class="ferr-tab__label">JSON</p><div class="ferr-tab__body"><pre><code class="language-json">{
|
|
743
|
+
"$schema": "https://ferrflow.com/schema/ferrflow.json",
|
|
744
|
+
"workspace": {
|
|
745
|
+
"tagTemplate": "{name}@v{version}"
|
|
746
|
+
},
|
|
747
|
+
"package": [
|
|
748
|
+
{
|
|
749
|
+
"name": "api",
|
|
750
|
+
"path": "packages/api",
|
|
751
|
+
"changelog": "packages/api/CHANGELOG.md",
|
|
752
|
+
"sharedPaths": ["packages/shared/"],
|
|
753
|
+
"versionedFiles": [
|
|
754
|
+
{ "path": "packages/api/Cargo.toml", "format": "toml" }
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "site",
|
|
759
|
+
"path": "packages/site",
|
|
760
|
+
"changelog": "packages/site/CHANGELOG.md",
|
|
761
|
+
"sharedPaths": ["packages/shared/"],
|
|
762
|
+
"versionedFiles": [
|
|
763
|
+
{ "path": "packages/site/package.json", "format": "json" }
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
]
|
|
767
|
+
}
|
|
768
|
+
</code></pre>
|
|
769
|
+
</div></div>
|
|
770
|
+
<div class="ferr-tab" data-label="TOML"><p class="ferr-tab__label">TOML</p><div class="ferr-tab__body"><pre><code class="language-toml">[workspace]
|
|
771
|
+
tag_template = "{name}@v{version}"
|
|
772
|
+
|
|
773
|
+
[[package]]
|
|
774
|
+
name = "api"
|
|
775
|
+
path = "packages/api"
|
|
776
|
+
changelog = "packages/api/CHANGELOG.md"
|
|
777
|
+
shared_paths = ["packages/shared/"]
|
|
778
|
+
|
|
779
|
+
[[package.versioned_files]]
|
|
780
|
+
path = "packages/api/Cargo.toml"
|
|
781
|
+
format = "toml"
|
|
782
|
+
|
|
783
|
+
[[package]]
|
|
784
|
+
name = "site"
|
|
785
|
+
path = "packages/site"
|
|
786
|
+
changelog = "packages/site/CHANGELOG.md"
|
|
787
|
+
shared_paths = ["packages/shared/"]
|
|
788
|
+
|
|
789
|
+
[[package.versioned_files]]
|
|
790
|
+
path = "packages/site/package.json"
|
|
791
|
+
format = "json"
|
|
792
|
+
</code></pre>
|
|
793
|
+
</div></div>
|
|
794
|
+
<div class="ferr-tab" data-label="JSON5"><p class="ferr-tab__label">JSON5</p><div class="ferr-tab__body"><pre><code class="language-json5">{
|
|
795
|
+
$schema: "https://ferrflow.com/schema/ferrflow.json",
|
|
796
|
+
workspace: {
|
|
797
|
+
tagTemplate: "{name}@v{version}",
|
|
798
|
+
},
|
|
799
|
+
package: [
|
|
800
|
+
{
|
|
801
|
+
name: "api",
|
|
802
|
+
path: "packages/api",
|
|
803
|
+
changelog: "packages/api/CHANGELOG.md",
|
|
804
|
+
sharedPaths: ["packages/shared/"],
|
|
805
|
+
versionedFiles: [
|
|
806
|
+
{ path: "packages/api/Cargo.toml", format: "toml" },
|
|
807
|
+
],
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: "site",
|
|
811
|
+
path: "packages/site",
|
|
812
|
+
changelog: "packages/site/CHANGELOG.md",
|
|
813
|
+
sharedPaths: ["packages/shared/"],
|
|
814
|
+
versionedFiles: [
|
|
815
|
+
{ path: "packages/site/package.json", format: "json" },
|
|
816
|
+
],
|
|
817
|
+
},
|
|
818
|
+
],
|
|
819
|
+
}
|
|
820
|
+
</code></pre>
|
|
821
|
+
</div></div>
|
|
822
|
+
<div class="ferr-tab" data-label="YAML"><p class="ferr-tab__label">YAML</p><div class="ferr-tab__body"><pre><code class="language-yaml">workspace:
|
|
823
|
+
tagTemplate: "{name}@v{version}"
|
|
824
|
+
|
|
825
|
+
package:
|
|
826
|
+
|
|
827
|
+
- name: api
|
|
828
|
+
path: packages/api
|
|
829
|
+
changelog: packages/api/CHANGELOG.md
|
|
830
|
+
sharedPaths:
|
|
831
|
+
- packages/shared/
|
|
832
|
+
versionedFiles:
|
|
833
|
+
- path: packages/api/Cargo.toml
|
|
834
|
+
format: toml
|
|
835
|
+
|
|
836
|
+
- name: site
|
|
837
|
+
path: packages/site
|
|
838
|
+
changelog: packages/site/CHANGELOG.md
|
|
839
|
+
sharedPaths:
|
|
840
|
+
- packages/shared/
|
|
841
|
+
versionedFiles:
|
|
842
|
+
- path: packages/site/package.json
|
|
843
|
+
format: json
|
|
844
|
+
</code></pre>
|
|
845
|
+
|
|
846
|
+
</div></div>
|
|
847
|
+
</div>
|
|
848
|
+
|
|
849
|
+
<aside class="ferr-aside ferr-aside--tip"><div class="ferr-aside__body"><p>Run <code>ferrflow init</code> to generate a config file automatically based on what FerrFlow detects in your repo.</p>
|
|
850
|
+
</div></aside>
|