@eui/tools 6.20.0 → 6.20.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.
Files changed (30) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/init.js +2 -0
  4. package/package.json +1 -1
  5. package/scripts/csdr/audit/yarn.js +1 -1
  6. package/scripts/csdr/config/config-skeletons.js +4 -4
  7. package/scripts/csdr/config/config-utils.js +0 -1
  8. package/scripts/csdr/config/global.js +16 -4
  9. package/scripts/csdr/init/global.js +8 -2
  10. package/scripts/csdr/init/packages.js +8 -0
  11. package/scripts/csdr/init/standalone/18.x/.eslintrc.eui18.standalone.json +133 -0
  12. package/scripts/csdr/init/standalone/18.x/.eslintrc.json +44 -0
  13. package/scripts/csdr/init/standalone/18.x/karma.conf.standalone.js +7 -0
  14. package/scripts/csdr/init/standalone/18.x/tsconfig.lib.standalone.json +34 -0
  15. package/scripts/csdr/init/standalone/18.x/tsconfig.spec.standalone.json +17 -0
  16. package/scripts/csdr/init/standalone/18.x/tsconfig.standalone.json +17 -0
  17. package/scripts/csdr/install/common.js +100 -0
  18. package/scripts/csdr/install/packages.js +59 -6
  19. package/scripts/csdr/metadata/package-utils.js +100 -25
  20. package/scripts/csdr/release/package/common.js +23 -7
  21. package/scripts/csdr/release/package/release-package-standalone.js +0 -187
  22. package/scripts/csdr/release/package/release-ui-standalone.js +20 -16
  23. package/scripts/index.js +0 -1
  24. package/scripts/utils/changelog-utils.js +6 -1
  25. package/scripts/utils/clean/clean-utils.js +10 -2
  26. package/scripts/utils/git-utils.js +6 -6
  27. package/scripts/utils/notification/config.js +1 -1
  28. package/scripts/utils/publish/npm.js +3 -3
  29. package/scripts/utils/sonar/sonar-utils.js +1 -1
  30. package/scripts/csdr/config/standalone.js +0 -108
@@ -63,6 +63,55 @@ const getPackageVersions = (module.exports.getPackageVersions = (pkg) => {
63
63
  return versions;
64
64
  });
65
65
 
66
+
67
+ const getPackageVersionsByNpmPkg = (module.exports.getPackageVersionsByNpmPkg = (npmPkg) => {
68
+ let npmOutput;
69
+ try {
70
+ npmOutput = execa.sync('npm', ['view', npmPkg, '--json']).stdout;
71
+ if (npmOutput.trim() === '') {
72
+ npmOutput = execa.sync('npm', ['view', `${npmPkg}@snapshot`, '--json']).stdout;
73
+ }
74
+ } catch(e) {
75
+ npmOutput = e.stdout;
76
+ }
77
+ // console.log(npmOutput);
78
+
79
+ let versions = [];
80
+
81
+ if (!npmOutput) {
82
+ tools.logWarning('Cannot find version of pkg - package is probably not published yet');
83
+ return versions;
84
+ }
85
+
86
+ const json = JSON.parse(npmOutput);
87
+
88
+ if (json.error) {
89
+ tools.logWarning('Error detected while trying to fetch the pkg version');
90
+ console.log(json.error);
91
+
92
+ } else {
93
+ if (json.versions) {
94
+ versions = json.versions.map((v) => {
95
+ return {
96
+ name: npmPkg,
97
+ version: v,
98
+ major: v.split('.')[0],
99
+ snapshot: v.indexOf('snapshot') > -1,
100
+ hotfix: v.indexOf('snapshot') === -1 && v.indexOf('-rc.') === -1 && v.indexOf('-next.') === -1 && v.indexOf('-') > -1,
101
+ rc: v.indexOf('-rc.') > -1,
102
+ date: json.time[v],
103
+ };
104
+ });
105
+ }
106
+ }
107
+
108
+ if (versions.length === 0) {
109
+ tools.logWarning(`Pkg versions not found for ${npmPkg}`);
110
+ }
111
+
112
+ return versions;
113
+ });
114
+
66
115
  module.exports.getPackageVersionsLatest = (pkg) => {
67
116
  const versions = getPackageVersions(pkg);
68
117
  return versions.filter((v) => !v.snapshot);
@@ -142,39 +191,55 @@ module.exports.isNewPackageBuild = (pkg) => {
142
191
  }
143
192
  };
144
193
 
145
- const getPackageVersionsByMajor = (pkg, major, isMaster, isDevEnvTarget) => {
146
- const pkgVersions = getPackageVersions(pkg);
147
194
 
148
- if (pkgVersions) {
149
- if (debug) tools.logInfo(`----> ${pkgVersions.length} metadata versions found for package`);
150
- let versions = [];
195
+
196
+ const filterMajorVersions = (pkgVersions, major, isMaster, isDevEnvTarget) => {
197
+ if (debug) tools.logInfo(`----> ${pkgVersions.length} metadata versions found for package`);
198
+
199
+ let versions = [];
200
+ versions = pkgVersions.filter((v) => v.major === major);
201
+
202
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions found for major version : ${major}`);
203
+
204
+ if (isMaster) {
205
+ versions = versions.filter((v) => !v.snapshot);
206
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions found excluding snapshots`);
207
+ } else {
151
208
  versions = pkgVersions.filter((v) => v.major === major);
209
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
210
+ }
152
211
 
153
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions found for major version : ${major}`);
212
+ if (debug) tools.logInfo('----> exluding hotfix package versions type');
213
+ versions = versions.filter((v) => !v.hotfix);
214
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding hotfix version type`);
154
215
 
155
- if (isMaster) {
156
- versions = versions.filter((v) => !v.snapshot);
157
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions found excluding snapshots`);
158
- } else {
159
- versions = pkgVersions.filter((v) => v.major === major);
160
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
216
+ if (!isDevEnvTarget) {
217
+ if (debug) {
218
+ tools.logInfo(
219
+ '----=> excluding RC release of versions found for non-DEV build (preventing RC releases to go to another env than DEV'
220
+ );
161
221
  }
222
+ versions = versions.filter((v) => !v.rc);
223
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding RC version type`);
224
+ }
225
+
226
+ return versions;
227
+ }
162
228
 
163
- if (debug) tools.logInfo('----> exluding hotfix package versions type');
164
- versions = versions.filter((v) => !v.hotfix);
165
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding hotfix version type`);
166
229
 
167
- if (!isDevEnvTarget) {
168
- if (debug) {
169
- tools.logInfo(
170
- '----=> excluding RC release of versions found for non-DEV build (preventing RC releases to go to another env than DEV'
171
- );
172
- }
173
- versions = versions.filter((v) => !v.rc);
174
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding RC version type`);
175
- }
230
+ const getPackageVersionsByMajor = (pkg, major, isMaster, isDevEnvTarget) => {
231
+ const pkgVersions = getPackageVersions(pkg);
176
232
 
177
- return versions;
233
+ if (pkgVersions) {
234
+ return filterMajorVersions(pkgVersions, major, isMaster, isDevEnvTarget);
235
+ }
236
+ };
237
+
238
+ const getPackageVersionsByMajorByNpmPkg = (npmPkg, major, isMaster, isDevEnvTarget) => {
239
+ const pkgVersions = getPackageVersionsByNpmPkg(npmPkg);
240
+
241
+ if (pkgVersions) {
242
+ return filterMajorVersions(pkgVersions, major, isMaster, isDevEnvTarget);
178
243
  }
179
244
  };
180
245
 
@@ -188,6 +253,16 @@ module.exports.getLastMajorVersion = (pkg, major, isMaster, isDevEnvTarget) => {
188
253
  }
189
254
  };
190
255
 
256
+ module.exports.getLastMajorVersionByNpmPkg = (npmPkg, major, isMaster, isDevEnvTarget) => {
257
+ tools.logInfo(`--Getting registry pkg version for ${npmPkg} - major: ${major}`);
258
+
259
+ const pkgVersionsMajor = getPackageVersionsByMajorByNpmPkg(npmPkg, major, isMaster, isDevEnvTarget);
260
+
261
+ if (pkgVersionsMajor && pkgVersionsMajor.length !== 0) {
262
+ return pkgVersionsMajor.splice(-1)[0].version;
263
+ }
264
+ };
265
+
191
266
  module.exports.getVersionMetadata = (pkg, version) => {
192
267
  const pkgVersions = getPackageVersions(pkg);
193
268
  if (pkgVersions) {
@@ -12,7 +12,7 @@ const versionUtils = require('../../version/version-utils');
12
12
  const configUtils = require('../../config/config-utils');
13
13
 
14
14
  // GLOBAL ARGS
15
- const { dryRun, pipelineId } = utils.tools.getArgs();
15
+ const { dryRun, pipelineId, skipCommitsCheck } = utils.tools.getArgs();
16
16
 
17
17
  const getBranchDefs = (branch) => {
18
18
  if (!branch) {
@@ -287,6 +287,11 @@ module.exports.commitMetadataChecks = (pkg) => {
287
287
  utils.tools.logTitle('Checking package commit metadata');
288
288
  let pkgMetadata;
289
289
 
290
+ if (skipCommitsCheck) {
291
+ utils.tools.logInfo('Commits checks skip active...skippping');
292
+ return {};
293
+ }
294
+
290
295
  if (pkg.remote) {
291
296
  utils.tools.logWarning('Remote package...skipping');
292
297
  return {};
@@ -337,7 +342,13 @@ module.exports.updateVersion = (pkg, pkgMetadata, envTarget) => {
337
342
  utils.tools.logBanner('UPDATE VERSION');
338
343
 
339
344
  // getting branch flags
340
- const branches = this.getBranches();
345
+ let branches;
346
+
347
+ if (pkg.standalone) {
348
+ branches = this.getBranchesFromRepo();
349
+ } else {
350
+ branches = this.getBranches();
351
+ }
341
352
 
342
353
  // local vars
343
354
  let newVersion;
@@ -470,7 +481,7 @@ const commitPackage = (pkg, version, branches) => {
470
481
  .then(() => {
471
482
  return utils.git.commitAndPush(
472
483
  branches.branch,
473
- `chore(release): update version: ${version} - from CI server`,
484
+ `chore(release): update version: ${version} - from CI server [skip ci]`,
474
485
  pkg.paths.root
475
486
  );
476
487
  })
@@ -487,7 +498,7 @@ const tagAndMerge = (pkg, version, branches) => {
487
498
  if (!branches.isSnapshot && !branches.isSupportSnapshot) {
488
499
  return utils.git.tagVersion(
489
500
  version, branches.branch,
490
- `chore(release): tagging ${version} - from CI server`,
501
+ `chore(release): tagging ${version} - from CI server [skip ci]`,
491
502
  pkg.paths.root
492
503
  );
493
504
  }
@@ -519,7 +530,12 @@ const tagAndMerge = (pkg, version, branches) => {
519
530
  module.exports.runGitOperations = (pkg, version) => {
520
531
  utils.tools.logBanner('RUN GIT OPERATIONS');
521
532
 
522
- const branches = this.getBranches();
533
+ let branches;
534
+ if (pkg.standalone) {
535
+ branches = this.getBranchesFromRepo();
536
+ } else {
537
+ branches = this.getBranches();
538
+ }
523
539
  console.log(branches);
524
540
 
525
541
  if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
@@ -646,7 +662,7 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
646
662
  if (!pkg.backend) {
647
663
  return Promise.resolve()
648
664
  .then(() => {
649
- if (pkg.build && pkg.build.skipLock) {
665
+ if ((pkg.build && pkg.build.skipLock) || pkg.standalone) {
650
666
  utils.tools.logInfo('lock package de-activated...skipping');
651
667
  } else {
652
668
  return metadataUtils.packageUtils.unlockPackage(pkg);
@@ -689,7 +705,7 @@ module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
689
705
  if (exception !== 'PACKAGE_LOCKED') {
690
706
  return Promise.resolve()
691
707
  .then(() => {
692
- if (pkg.build && pkg.build.skipLock) {
708
+ if ((pkg.build && pkg.build.skipLock) || pkg.standalone) {
693
709
  utils.tools.logInfo('lock package de-activated...skipping');
694
710
  } else {
695
711
  return metadataUtils.packageUtils.unlockPackage(pkg);
@@ -22,190 +22,3 @@ module.exports.run = () => {
22
22
  throw e;
23
23
  })
24
24
  }
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- 'use strict';
48
-
49
- // UTILS
50
- const utils = require('../../../utils');
51
-
52
- // CSDR RELATED
53
- const configUtils = require('../../config/config-utils');
54
- const auditUtils = require('../../audit/audit-utils');
55
- const installUtils = require('../../install/install-utils');
56
-
57
- // INNER MODULES
58
- const innerCommon = require('./common');
59
-
60
-
61
- module.exports.run = () => {
62
- // pre-requisites : package repository cloned - on gitlab script is run on the repo pipeline itself
63
-
64
- const { dryRun } = utils.tools.getArgs();
65
-
66
- utils.tools.logBanner('Starting UI stand-alone pipeline');
67
-
68
- // local saved vars
69
- let newVersion, commitsMetadata;
70
-
71
- // getting the package information - mimics CSDR package config
72
- const pkg = configUtils.packages.getStandalonePackage();
73
-
74
- // get branches config
75
- const branches = innerCommon.getBranchesFromRepo();
76
-
77
- // get global config options
78
- const configOptions = configUtils.standalone.getConfigOptions();
79
-
80
- return (
81
- Promise.resolve()
82
-
83
- // RELEASE PACKAGE START
84
-
85
- // Starting the release flow
86
- .then(() => {
87
- return innerCommon.initMessage(pkg, branches);
88
- })
89
-
90
- // CHECK BRANCH VALIDITY
91
- .then(() => {
92
- innerCommon.checkBranchValidity(branches);
93
- })
94
-
95
- // COMMIT METADATA CHECKS
96
- .then(() => {
97
- return innerCommon.commitMetadataChecks(pkg);
98
- })
99
- .then((metadata) => {
100
- commitsMetadata = metadata;
101
- })
102
-
103
-
104
- // INIT PACKAGE CONFIG
105
- .then(() => {
106
- // generating angular.json config if not existing
107
- configUtils.angular.checkAngularConfig();
108
-
109
- // registering package angular config
110
- configUtils.angular.registerAngularPackage(pkg);
111
- })
112
-
113
- // INIT ROOT FILES - yarn lock and resolution based on current eUI version of the package
114
- // TODO - get the raw eUI version from package.json dependencies - need to test and adapt the config.global.getLocalEuiversion
115
- // .then(() => {
116
- // return initUtils.global.initRootFilesAndResolutions();
117
- // })
118
-
119
-
120
- // INSTALL dependencies by type
121
- .then(() => {
122
- utils.tools.logBanner('INSTALL DEPENDENCIES');
123
-
124
- return (
125
- Promise.resolve()
126
- // executing install for current package - based on package.json
127
- .then(() => {
128
- return installUtils.common.executeInstall(process.cwd(), configOptions.NPM_REGISTRY_INSTALL);
129
- })
130
-
131
- // auditing dependencies
132
- .then(() => {
133
- return auditUtils.yarn.audit(pkg);
134
- })
135
- .catch((e) => {
136
- throw e;
137
- })
138
- );
139
- })
140
-
141
- // BUILD PACKAGE
142
- .then(() => {
143
- return utils.buildPackage.build(pkg, branches.isMaster, false);
144
- })
145
-
146
- // EXECUTING SONAR ANALYSIS
147
- .then(() => {
148
- return utils.sonar.run(pkg, branches.isMaster);
149
- })
150
-
151
- // GENERATE and UPDATE new version
152
- .then(() => {
153
- return innerCommon.updateVersion(pkg, commitsMetadata);
154
- })
155
- .then((version) => {
156
- // storing version for later use
157
- newVersion = version;
158
- })
159
-
160
- // GENERATE CHANGELOG
161
- .then(() => {
162
- utils.tools.logTitle('generating changelog...');
163
- return utils.changelog.generate(pkg, newVersion, commitsMetadata.commits);
164
- })
165
-
166
- // WRITE CHANGELOG for MASTER and SUPPORT
167
- .then((changelogContent) => {
168
- utils.tools.logTitle('writing changelog...');
169
-
170
- if ((branches.isSupport || branches.isNext || branches.isMaster) && !dryRun) {
171
- return utils.changelog.writeChangelog(changelogContent, pkg.paths.root);
172
-
173
- } else {
174
- utils.tools.logInfo('WRITING SKIPPED - (either DRY-RUN or snapshot release) - Actual changelog :');
175
- console.log(changelogContent);
176
- }
177
- })
178
-
179
- // PUBLISH PACKAGE
180
- .then(() => {
181
- return utils.publish.publish(pkg);
182
- })
183
-
184
- // GIT OPERATIONS
185
- .then(() => {
186
- return innerCommon.commitPackage(pkg, newVersion, branches);
187
- })
188
- .then(() => {
189
- return innerCommon.tagAndMerge(pkg, newVersion, branches);
190
- })
191
-
192
- // SEND SUCCESS NOTIFICATION
193
- .then(() => {
194
- return innerCommon.sendSuccessNotification(pkg, newVersion, commitsMetadata, false).then(() => {
195
- return innerCommon.close(pkg);
196
- });
197
- })
198
-
199
- // SEND ERROR NOTIFICATION
200
- .catch((e) => {
201
- return innerCommon
202
- .sendErrorNotification(pkg, e, commitsMetadata, false)
203
- .then(() => {
204
- return innerCommon.close(pkg);
205
- })
206
- .then(() => {
207
- process.exit(1);
208
- });
209
- })
210
- );
211
- };
@@ -6,19 +6,27 @@ const utils = require('../../../utils');
6
6
  // CSDR RELATED
7
7
  const configUtils = require('../../config/config-utils');
8
8
  const auditUtils = require('../../audit/audit-utils');
9
+ const initUtils = require('../../init/init-utils');
9
10
  const installUtils = require('../../install/install-utils');
10
11
 
11
12
  // INNER MODULES
12
13
  const innerCommon = require('./common');
13
14
 
14
15
 
15
- module.exports.run = () => {
16
- // pre-requisites : package repository cloned - on gitlab script is run on the repo pipeline itself
16
+ // LOCAL TEST :
17
+ // - symlink eUI tools sources to node_modules of standalone pkg folder node_modules to test
18
+ // - execute this command on the standalone pkg folder :
19
+ // npx @eui/tools release-package-standalone --dryRun --debug --debugNotification --skipCommitsCheck --skipAudit --skipPublish --skipGitUpdates
20
+
17
21
 
22
+ module.exports.run = () => {
18
23
  const { dryRun } = utils.tools.getArgs();
19
24
 
20
25
  utils.tools.logBanner('Starting UI stand-alone pipeline');
21
26
 
27
+ // utils.tools.logTitle('Provided arguments : ');
28
+ // console.log(utils.tools.getArgs());
29
+
22
30
  // local saved vars
23
31
  let newVersion, commitsMetadata;
24
32
 
@@ -28,9 +36,6 @@ module.exports.run = () => {
28
36
  // get branches config
29
37
  const branches = innerCommon.getBranchesFromRepo();
30
38
 
31
- // get global config options
32
- const configOptions = configUtils.standalone.getConfigOptions();
33
-
34
39
  return (
35
40
  Promise.resolve()
36
41
 
@@ -54,6 +59,10 @@ module.exports.run = () => {
54
59
  commitsMetadata = metadata;
55
60
  })
56
61
 
62
+ // SPECIFIC INJECTION FOR STANDALONE PKG ROOT FILES
63
+ .then(() => {
64
+ return initUtils.packages.injectStandaloneResources(pkg);
65
+ })
57
66
 
58
67
  // INIT PACKAGE CONFIG
59
68
  .then(() => {
@@ -65,11 +74,10 @@ module.exports.run = () => {
65
74
  })
66
75
 
67
76
  // INIT ROOT FILES - yarn lock and resolution based on current eUI version of the package
68
- // TODO - get the raw eUI version from package.json dependencies - need to test and adapt the config.global.getLocalEuiversion
69
- // .then(() => {
70
- // return initUtils.global.initRootFilesAndResolutions();
71
- // })
72
-
77
+ .then(() => {
78
+ const euiVersion = configUtils.packages.getPackageEuiVersion(pkg);
79
+ return initUtils.global.initRootFilesAndResolutions(euiVersion);
80
+ })
73
81
 
74
82
  // INSTALL dependencies by type
75
83
  .then(() => {
@@ -77,9 +85,8 @@ module.exports.run = () => {
77
85
 
78
86
  return (
79
87
  Promise.resolve()
80
- // executing install for current package - based on package.json
81
88
  .then(() => {
82
- return installUtils.common.executeInstall(process.cwd(), configOptions.NPM_REGISTRY_INSTALL);
89
+ return installUtils.packages.installDepsStandalone(pkg, branches.isMaster);
83
90
  })
84
91
 
85
92
  // auditing dependencies
@@ -137,10 +144,7 @@ module.exports.run = () => {
137
144
 
138
145
  // GIT OPERATIONS
139
146
  .then(() => {
140
- return innerCommon.commitPackage(pkg, newVersion, branches);
141
- })
142
- .then(() => {
143
- return innerCommon.tagAndMerge(pkg, newVersion, branches);
147
+ return innerCommon.runGitOperations(pkg, newVersion);
144
148
  })
145
149
 
146
150
  // SEND SUCCESS NOTIFICATION
package/scripts/index.js CHANGED
@@ -99,7 +99,6 @@ module.exports.configPackages = require('./csdr/config/packages');
99
99
  module.exports.configProjects = require('./csdr/config/projects');
100
100
  module.exports.configRegister = require('./csdr/config/register');
101
101
  module.exports.configRemotes = require('./csdr/config/remotes');
102
- module.exports.configStandalone = require('./csdr/config/standalone');
103
102
  module.exports.configSync = require('./csdr/config/sync');
104
103
 
105
104
  // csdr -init
@@ -38,6 +38,11 @@ module.exports.generate = (pkg, version, commits) => {
38
38
 
39
39
  let repoUrl;
40
40
 
41
+ if (!commits) {
42
+ tools.logWarning('Unable to find commits metadata to parse');
43
+ return null;
44
+ }
45
+
41
46
  heading += ' ' + version + ' (' + date + ')';
42
47
 
43
48
  content.push(heading);
@@ -46,7 +51,7 @@ module.exports.generate = (pkg, version, commits) => {
46
51
  let ISSUES_MANAGER_HOST;
47
52
 
48
53
  if (pkg.standalone) {
49
- ISSUES_MANAGER_HOST = configUtils.standalone.getConfigOptions().ISSUES_MANAGER_HOST;
54
+ ISSUES_MANAGER_HOST = configUtils.global.getConfigOptionsStandalone().ISSUES_MANAGER_HOST;
50
55
  } else {
51
56
  ISSUES_MANAGER_HOST = configUtils.global.getConfigOptions().ISSUES_MANAGER_HOST;
52
57
  }
@@ -7,7 +7,11 @@ module.exports.cleanPackage = (pkg) => {
7
7
  return Promise.resolve()
8
8
  .then(() => {
9
9
  tools.logInfo('Cleaning dist')
10
- return tools.rimraf(pkg.paths.root + '/**/dist');
10
+ if (pkg.standalone) {
11
+ return tools.rimraf(pkg.paths.root + '/dist');
12
+ } else {
13
+ return tools.rimraf(pkg.paths.root + '/**/dist');
14
+ }
11
15
  })
12
16
  .then(() => {
13
17
  tools.logInfo('Cleaning out-tsc')
@@ -23,7 +27,11 @@ module.exports.cleanPackage = (pkg) => {
23
27
  })
24
28
  .then(() => {
25
29
  tools.logInfo('Cleaning test files')
26
- return tools.rimraf(pkg.paths.root + '/**/test');
30
+ if (pkg.standalone) {
31
+ return tools.rimraf(pkg.paths.root + '/test');
32
+ } else {
33
+ return tools.rimraf(pkg.paths.root + '/**/test');
34
+ }
27
35
  })
28
36
  .then(() => {
29
37
  tools.logSuccess();
@@ -11,7 +11,7 @@ const { getPackageConfig } = require('./notification/config');
11
11
  // const versionUtils = require('./version-utils');
12
12
 
13
13
  // FETCH ARGS
14
- const { dryRun, git, debug, build } = tools.getArgs();
14
+ const { dryRun, git, debug, build, skipGitUpdates } = tools.getArgs();
15
15
 
16
16
 
17
17
  const getLastTag = (folder) => {
@@ -31,7 +31,7 @@ const getLastTag = (folder) => {
31
31
  }
32
32
 
33
33
  const getBranchName = (folder = process.cwd()) => {
34
- const branchName = execa.sync('git', ['rev-parse','--abbrev-ref', 'HEAD'], { cwd: folder }).stdout;
34
+ const branchName = execa.sync('git', ['symbolic-ref','--short', 'HEAD'], { cwd: folder }).stdout;
35
35
  return branchName;
36
36
  }
37
37
 
@@ -96,7 +96,7 @@ const commitAndPush = (branch, message, folder) => {
96
96
  tools.logTitle('Commit and pushing files');
97
97
  tools.logInfo(`on branch : ${branch} / folder provided : ${folder}`);
98
98
 
99
- if (dryRun) {
99
+ if (dryRun || skipGitUpdates) {
100
100
  tools.logInfo('DRY-RUN: skipping commit and push files');
101
101
 
102
102
  } else {
@@ -134,7 +134,7 @@ const tagVersion = (version, branch, message, folder) => {
134
134
  tools.logInfo(`Pushing changes to origin/${branch}...`);
135
135
  tools.logInfo(`Tagging MASTER branch with v${version}...`);
136
136
 
137
- if (dryRun) {
137
+ if (dryRun || skipGitUpdates) {
138
138
  tools.logInfo('DRY-RUN: skipping tagging of version');
139
139
  return Promise.resolve();
140
140
 
@@ -167,7 +167,7 @@ const mergeMasterToDevelop = (pkg, folder, version) => {
167
167
  tools.logTitle('Merge back on develop');
168
168
  tools.logInfo(`Merging release changes into "develop" branch...`);
169
169
 
170
- if (dryRun) {
170
+ if (dryRun || skipGitUpdates) {
171
171
  tools.logInfo('DRY-RUN: skipping merge master to develop');
172
172
  return;
173
173
 
@@ -207,7 +207,7 @@ const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportSnapsho
207
207
  tools.logTitle(`Merge back on ${supportSnapshotBranch}`);
208
208
  tools.logInfo(`Merging release changes into ${supportSnapshotBranch} branch...`);
209
209
 
210
- if (dryRun) {
210
+ if (dryRun || skipGitUpdates) {
211
211
  tools.logInfo('DRY-RUN: skipping merge support to supportDevelop');
212
212
  return Promise.resolve();
213
213
  }
@@ -13,7 +13,7 @@ module.exports.getPackageConfig = (pkg) => {
13
13
  let globalConfig;
14
14
 
15
15
  if (pkg.standalone) {
16
- globalConfig = configUtils.standalone.getConfigOptions();
16
+ globalConfig = configUtils.global.getConfigOptionsStandalone()
17
17
  } else {
18
18
  globalConfig = configUtils.global.getConfigOptions();
19
19
  }
@@ -10,7 +10,7 @@ const notificationUtils = require('../notification/notification-utils');
10
10
  const configUtils = require('../../csdr/config/config-utils');
11
11
 
12
12
  // FETCH ARGS
13
- const { dryRun, registry } = tools.getArgs();
13
+ const { dryRun, registry, skipPublish } = tools.getArgs();
14
14
 
15
15
 
16
16
 
@@ -42,7 +42,7 @@ const publishCore = module.exports.publishCore = (pkg, registry, isPublicAccess)
42
42
  // command += ' --access public';
43
43
  }
44
44
 
45
- if (dryRun) {
45
+ if (dryRun || skipPublish) {
46
46
  tools.logInfo(`DRY-RUN: npm publish command to be executed : ${args}`);
47
47
 
48
48
  return notificationUtils.package.sendPackageMessage({
@@ -112,7 +112,7 @@ const publishPackage = (pkg, parentPkg) => {
112
112
  let configOptions;
113
113
 
114
114
  if (pkg.standalone) {
115
- configOptions = configUtils.standalone.getConfigOptions();
115
+ configOptions = configUtils.global.getConfigOptionsStandalone();
116
116
  } else {
117
117
  configOptions = configUtils.global.getConfigOptions();
118
118
  }
@@ -120,7 +120,7 @@ const runUI = (pkg, isMaster) => {
120
120
 
121
121
  let SONAR_HOST;
122
122
  if (pkg.standalone) {
123
- SONAR_HOST = configUtils.standalone.getConfigOptions().SONAR_HOST;
123
+ SONAR_HOST = configUtils.global.getConfigOptionsStandalone().SONAR_HOST;
124
124
  } else {
125
125
  SONAR_HOST = configUtils.global.getConfigOptions().SONAR_HOST;
126
126
  }