@cmflow/cli 1.1.1-alpha.1 → 2.0.0-alpha.10
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/.yarn/releases/yarn-4.7.0.cjs +935 -0
- package/.yarnrc.yml +3 -0
- package/README.md +78 -10
- package/bin/cm-config.js +0 -0
- package/bin/cm-fetch.js +0 -0
- package/bin/cm-finish.js +0 -0
- package/bin/cm-merge.js +0 -0
- package/bin/cm-publish.js +0 -0
- package/bin/cm-push.js +0 -0
- package/bin/cm-rebase.js +0 -0
- package/bin/cm-republish.js +0 -0
- package/bin/cm-start.js +0 -0
- package/bin/cm.js +0 -0
- package/bin/cmrelease.js +0 -0
- package/package.json +25 -29
- package/release.config.mjs +8 -22
- package/src/commands/index.js +0 -1
- package/src/semantic/core/conditional.js +42 -0
- package/src/semantic/core/prepare/commit.js +29 -0
- package/src/semantic/core/prepare/release-info.js +5 -0
- package/src/semantic/core/publish/exit.js +7 -0
- package/src/semantic/core/publish/sync-repository.js +42 -0
- package/src/semantic/utils/release-rules.js +11 -1
- package/src/semantic/utils/transform-writer.js +2 -0
- package/bin/cm-changelog.js +0 -26
- package/src/commands/changelog.js +0 -47
- package/src/semantic/core/fail.js +0 -29
- package/src/semantic/core/generate-notes.js +0 -11
- package/src/semantic/core/prepare/post.js +0 -38
- package/src/semantic/core/publish.js +0 -9
- package/src/semantic/core/success.js +0 -37
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { getConfig } from "../../common/get-config.js";
|
|
2
|
-
import { git } from "../../common/index.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Add runAfter property with the semantic-release plugin name to run after the success task
|
|
6
|
-
* depending on the branch type.
|
|
7
|
-
*
|
|
8
|
-
* @param pluginConfig {{runAfter: string}}
|
|
9
|
-
* @param context
|
|
10
|
-
* @return {Promise<void>}
|
|
11
|
-
*/
|
|
12
|
-
export async function success(pluginConfig, context) {
|
|
13
|
-
context.config = getConfig();
|
|
14
|
-
const {
|
|
15
|
-
branch,
|
|
16
|
-
logger,
|
|
17
|
-
config: { PRODUCTION_BRANCH, ORIGIN, DEVELOP_BRANCH }
|
|
18
|
-
} = context;
|
|
19
|
-
|
|
20
|
-
if (branch.type !== "prerelease") {
|
|
21
|
-
await git.push("--quiet", "--set-upstream", ORIGIN, PRODUCTION_BRANCH);
|
|
22
|
-
|
|
23
|
-
if (PRODUCTION_BRANCH !== DEVELOP_BRANCH) {
|
|
24
|
-
logger.start(`Reset HEAD of ${ORIGIN}/${DEVELOP_BRANCH} branch to HEAD of ${ORIGIN}/${PRODUCTION_BRANCH} `);
|
|
25
|
-
|
|
26
|
-
await git.push("-f", ORIGIN, `refs/remotes/${ORIGIN}/${PRODUCTION_BRANCH}:refs/heads/${DEVELOP_BRANCH}`);
|
|
27
|
-
|
|
28
|
-
logger.success(`${ORIGIN}/${DEVELOP_BRANCH} branch correctly updated`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (pluginConfig.runAfter) {
|
|
32
|
-
const { success } = await import(pluginConfig.runAfter);
|
|
33
|
-
|
|
34
|
-
await success(pluginConfig, context);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|