@cmflow/cli 0.72.0 → 0.73.2

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.72.0",
3
+ "version": "0.73.2",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -104,7 +104,6 @@ export function getConfig () {
104
104
  REF_COMMIT,
105
105
  GH_TOKEN,
106
106
  HEROKU_APP,
107
- SKIP_DEPLOY,
108
107
  SKIP_GITHUB_PUBLISH,
109
108
  GITHUB_PAGES_PATH,
110
109
  REPOSITORY_URL,
@@ -154,13 +153,18 @@ export function getConfig () {
154
153
  } = process.env
155
154
  return DOCKER_REPOSITORY || `${OWNER || owner}/${PROJECT_NAME || projectName}`
156
155
  },
156
+ get SKIP_DEPLOY () {
157
+ return toBool(process.env.SKIP_DEPLOY)
158
+ },
159
+ get SKIP_E2E () {
160
+ return process.env.SKIP_E2E ? toBool(process.env.SKIP_E2E) : false
161
+ },
157
162
  DOCKER_HUB_ID,
158
163
  DOCKER_HUB_PWD,
159
164
  HEROKU_APP,
160
165
  REF_COMMIT,
161
166
  GH_TOKEN,
162
167
  REPOSITORY_URL: get(pkg, 'repository.url', get(pkg, 'repository', REPOSITORY_URL)),
163
- SKIP_DEPLOY,
164
168
  SKIP_GITHUB_PUBLISH,
165
169
  GITHUB_PAGES_PATH,
166
170
  GIT_USER_NAME,
@@ -36,6 +36,7 @@ export async function prepare (pluginConfig, context) {
36
36
  HAS_E2E,
37
37
  E2E_CMD,
38
38
  SKIP_DEPLOY,
39
+ SKIP_E2E,
39
40
  SKIP_GITHUB_PUBLISH,
40
41
  HAS_YARN,
41
42
  HAS_LERNA,
@@ -77,12 +78,16 @@ export async function prepare (pluginConfig, context) {
77
78
  logger.info('Start build task')
78
79
  await pkgManager.run('build')
79
80
  logger.info('Build task finished with success...')
81
+ } else {
82
+ logger.info('Skipping build task')
80
83
  }
81
84
 
82
- if (HAS_E2E && !SKIP_DEPLOY) {
85
+ if (HAS_E2E && !SKIP_DEPLOY && !SKIP_E2E) {
83
86
  logger.info('Start test_e2e task')
84
87
  await pkgManager.run(E2E_CMD || 'test_e2e')
85
88
  logger.info('test_e2e task finished with success...')
89
+ } else {
90
+ logger.info('Skipping test_e2e task')
86
91
  }
87
92
 
88
93
  if (!SKIP_GITHUB_PUBLISH) {
@@ -2,16 +2,22 @@ import { docker } from '../../common'
2
2
  import { heroku } from '../../common/cli/heroku'
3
3
 
4
4
  export async function dockerPublish (context) {
5
- const { config: { DEPLOY_ON_DOCKER, DEPLOY_ON_HEROKU, SKIP_DEPLOY } } = context
5
+ const { logger, config: { DEPLOY_ON_DOCKER, DEPLOY_ON_HEROKU, SKIP_DEPLOY } } = context
6
6
 
7
7
  if (!SKIP_DEPLOY) {
8
8
  if (DEPLOY_ON_DOCKER) {
9
9
  await deployOnDockerHub(context)
10
+ } else {
11
+ logger.info('Skip docker publish')
10
12
  }
11
13
 
12
14
  if (DEPLOY_ON_HEROKU) {
13
15
  await deployOnHeroku(context)
16
+ } else {
17
+ logger.info('Skip heroku publish')
14
18
  }
19
+ } else {
20
+ logger.info('Skip docker/heroku publish')
15
21
  }
16
22
  }
17
23
 
@@ -29,6 +29,10 @@ describe('dockerPublish', () => {
29
29
  })
30
30
  it('should do nothing', async () => {
31
31
  const context = {
32
+ logger: {
33
+ info: jest.fn(),
34
+ warn: jest.fn()
35
+ },
32
36
  branch: {
33
37
  name: 'branch-name'
34
38
  },