@cmflow/cli 0.65.6 → 0.66.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmflow/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.0",
|
|
4
4
|
"description": "An awesome Git Flow",
|
|
5
5
|
"author": "camfou",
|
|
6
6
|
"license": "MIT",
|
|
@@ -85,5 +85,11 @@
|
|
|
85
85
|
"eslint -c .eslintrc --fix",
|
|
86
86
|
"git add"
|
|
87
87
|
]
|
|
88
|
+
},
|
|
89
|
+
"flow": {
|
|
90
|
+
"branch": {
|
|
91
|
+
"develop": "master",
|
|
92
|
+
"production": "master"
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
95
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { git, npm, yarn } from '../../common'
|
|
2
2
|
|
|
3
|
-
export const runTest = ({
|
|
3
|
+
export const runTest = ({
|
|
4
|
+
E2E_CMD,
|
|
5
|
+
useYarn,
|
|
6
|
+
skipTest,
|
|
7
|
+
skipUnit,
|
|
8
|
+
skipE2E
|
|
9
|
+
}) => {
|
|
4
10
|
const manager = useYarn ? yarn : npm
|
|
5
11
|
|
|
6
12
|
return [
|
|
@@ -12,7 +18,7 @@ export const runTest = ({ useYarn, skipTest, skipUnit, skipE2E }) => {
|
|
|
12
18
|
{
|
|
13
19
|
title: 'E2E test',
|
|
14
20
|
skip: () => skipTest || skipE2E,
|
|
15
|
-
task: () => manager.run('test_e2e')
|
|
21
|
+
task: () => manager.run(E2E_CMD || 'test_e2e')
|
|
16
22
|
},
|
|
17
23
|
{
|
|
18
24
|
title: 'Reset changes',
|
package/src/common/cli/yarn.js
CHANGED
package/src/common/get-config.js
CHANGED
|
@@ -92,12 +92,15 @@ export function getConfig () {
|
|
|
92
92
|
GIT_USER_EMAIL
|
|
93
93
|
} = process.env
|
|
94
94
|
|
|
95
|
+
const e2eCmd = pkg.scripts.test_e2e ? 'test_e2e' : pkg.scripts['test:e2e'] ? 'test:e2e' : undefined
|
|
96
|
+
|
|
95
97
|
return {
|
|
96
98
|
PROJECT_NAME: PROJECT_NAME || projectName,
|
|
97
99
|
HAS_YARN: hasYarn(),
|
|
98
100
|
HAS_LERNA: pkg.dependencies.lerna || pkg.devDependencies.lerna,
|
|
99
101
|
HAS_BUILD: pkg.scripts.build,
|
|
100
|
-
HAS_E2E:
|
|
102
|
+
HAS_E2E: !!e2eCmd,
|
|
103
|
+
E2E_CMD: e2eCmd,
|
|
101
104
|
HAS_BUILD_CHANGELOG: pkg.scripts.build_changelog,
|
|
102
105
|
get DEPLOY_ON_DOCKER () {
|
|
103
106
|
return toBool(process.env.DEPLOY_ON_DOCKER) && DOCKER_HUB_ID && DOCKER_HUB_PWD
|
|
@@ -107,10 +110,10 @@ export function getConfig () {
|
|
|
107
110
|
RELEASE_CANDIDATE_TAG: '[MEP]',
|
|
108
111
|
ORIGIN: 'origin',
|
|
109
112
|
get PRODUCTION_BRANCH () {
|
|
110
|
-
return process.env.PRODUCTION_BRANCH || 'production'
|
|
113
|
+
return get('flow.branch.production') || process.env.PRODUCTION_BRANCH || 'production'
|
|
111
114
|
},
|
|
112
115
|
get DEVELOP_BRANCH () {
|
|
113
|
-
return process.env.DEVELOP_BRANCH || 'master'
|
|
116
|
+
return get('flow.branch.develop') || process.env.DEVELOP_BRANCH || 'master'
|
|
114
117
|
},
|
|
115
118
|
get OWNER () {
|
|
116
119
|
return process.env.OWNER || owner
|