@cmflow/cli 2.0.0-alpha.14 → 2.0.0-alpha.16
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/.yarn/install-state.gz +0 -0
- package/README.md +2 -3
- package/package.json +1 -1
- package/src/semantic/core/exit.js +10 -4
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/README.md
CHANGED
|
@@ -95,10 +95,9 @@ export default defineConfig({
|
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
97
|
[
|
|
98
|
-
'@cmflow/cli/semantic/core/
|
|
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.
|
|
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,8 +1,14 @@
|
|
|
1
1
|
import { getConfig } from "../../common/index.js";
|
|
2
2
|
|
|
3
|
-
export default async function exit(
|
|
3
|
+
export default async function exit(pluginConfig, context) {
|
|
4
4
|
context.config = getConfig();
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
}
|