@cmflow/cli 2.0.0-alpha.14 → 2.0.0-alpha.15

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
@@ -95,10 +95,9 @@ export default defineConfig({
95
95
  }
96
96
  ],
97
97
  [
98
- '@cmflow/cli/semantic/core/conditional', // run process.exit(0) if the branch is not a release branch - legacy: maybe not necessary now all task are conditional
98
+ '@cmflow/cli/semantic/core/exit', // run process.exit(0) if the branch is not a release branch - legacy: maybe not necessary now all task are conditional
99
99
  {
100
- when: (context) => context.branch.type !== 'release',
101
- run: '@cmflow/cli/semantic/core/exit'
100
+ when: (context) => context.nextRelease.channel === 'prerelease'
102
101
  }
103
102
  ]
104
103
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "2.0.0-alpha.14",
3
+ "version": "2.0.0-alpha.15",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -2,7 +2,13 @@ import { getConfig } from "../../common/index.js";
2
2
 
3
3
  export default async function exit(_, context) {
4
4
  context.config = getConfig();
5
- // avoid next semantic-release steps when is a prerelease or release branch with SKIP_GITHUB_PUBLISH
6
- context.logger.success("Skip next semantic-release steps");
7
- process.exit(0);
5
+ const condition = pluginConfig.when !== undefined ? pluginConfig.when(context) : true;
6
+
7
+ if (condition) {
8
+ // avoid next semantic-release steps when is a prerelease or release branch with SKIP_GITHUB_PUBLISH
9
+ context.logger.success("Skip next semantic-release steps");
10
+ process.exit(0);
11
+ } else {
12
+ context.logger.success("Continue next semantic-release steps");
13
+ }
8
14
  }