@cmflow/cli 2.0.0-alpha.3 → 2.0.0-alpha.4

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.
Binary file
package/README.md CHANGED
@@ -165,6 +165,26 @@ Example:
165
165
  }
166
166
  ```
167
167
 
168
+ ### Generate release.info file
169
+
170
+ CmFlow release generate a `release.info` file in the root of your project. This file contains the branch name.
171
+
172
+ ```js
173
+ import { defineConfig } from '@cmflow/cli'
174
+
175
+ export default defineConfig({
176
+ prepare: [
177
+ '@cmflow/cli/semantic/prepare/bump-version',
178
+ [
179
+ '@cmflow/cli/semantic/prepare/release-info',
180
+ {
181
+ path: './resources/release.info'
182
+ }
183
+ ]
184
+ ]
185
+ })
186
+ ```
187
+
168
188
  ### Deploy on Docker Hub
169
189
 
170
190
  Add the following configuration to your `release.config.js`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -0,0 +1,5 @@
1
+ import { writeFile } from "fs:node/promises";
2
+
3
+ export function prepare(pluginConfig, context) {
4
+ return writeFile(pluginConfig.path, context.branch.name, { encoding: "utf-8" });
5
+ }