@eui/tools 5.0.0-rc.15 → 5.0.0-rc.18

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.
@@ -1 +1 @@
1
- 5.0.0-rc.15
1
+ 5.0.0-rc.18
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 5.0.0-rc.18 (2022-03-31)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * added compositeType as exported gitlab variables - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([606a7916](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/606a791695f6697bfa34b14dd4ddf0e5a132e119))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.0.0-rc.17 (2022-03-31)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * export of app_target - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([2452d13b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2452d13b517f261642079795721af154991c9c88))
16
+
17
+ * * *
18
+ * * *
19
+ ## 5.0.0-rc.16 (2022-03-31)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * **other:**
24
+ * control tag and merge for envTarget remote delivery - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([a0b1568e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a0b1568ebe20b0cbb2ef8c85bb01df032e37f122))
25
+
26
+ * * *
27
+ * * *
1
28
  ## 5.0.0-rc.15 (2022-03-31)
2
29
 
3
30
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.0.0-rc.15",
3
+ "version": "5.0.0-rc.18",
4
4
  "tag": "next",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -342,14 +342,10 @@ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
342
342
  })
343
343
  }
344
344
 
345
- module.exports.runGitOperations = (pkg, version) => {
346
- utils.tools.logBanner('RUN GIT OPERATIONS');
347
-
348
- const branches = this.getBranches();
349
- console.log(branches);
350
345
 
351
- return Promise.resolve()
346
+ const commitPackage = (pkg, version, branches) => {
352
347
  // COMMIT and PUSH UPDATED FILES ON PACKAGE REPOSITORY
348
+ return Promise.resolve()
353
349
  .then(() => {
354
350
  return utils.git.commitAndPush(
355
351
  branches.branch,
@@ -357,7 +353,14 @@ module.exports.runGitOperations = (pkg, version) => {
357
353
  pkg.paths.pkgDirectory
358
354
  );
359
355
  })
356
+ .catch((e) => {
357
+ throw e;
358
+ })
359
+ }
360
360
 
361
+
362
+ const tagAndMerge = (pkg, version, branches) => {
363
+ return Promise.resolve()
361
364
  // TAG THE NEW RELEASE (MASTER) for MASTER and SUPPORT
362
365
  .then(() => {
363
366
  if (!branches.isSnapshot && !branches.isSupportSnapshot) {
@@ -392,6 +395,41 @@ module.exports.runGitOperations = (pkg, version) => {
392
395
 
393
396
 
394
397
 
398
+ module.exports.runGitOperations = (pkg, version) => {
399
+ utils.tools.logBanner('RUN GIT OPERATIONS');
400
+
401
+ const branches = this.getBranches();
402
+ console.log(branches);
403
+
404
+ if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
405
+ utils.tools.logInfo('Remote - with envTargetActive set - commit package only');
406
+
407
+ return Promise.resolve()
408
+ .then(() => {
409
+ return commitPackage(pkg, version, branches);
410
+ })
411
+ .catch((e) => {
412
+ throw e;
413
+ })
414
+
415
+ } else {
416
+ utils.tools.logInfo('Normal UI package - commit package, tagging and do merge operations if needed');
417
+
418
+ return Promise.resolve()
419
+ .then(() => {
420
+ return commitPackage(pkg, version, branches);
421
+ })
422
+ .then(() => {
423
+ return tagAndMerge(pkg, version, branches);
424
+ })
425
+ .catch((e) => {
426
+ throw e;
427
+ })
428
+ }
429
+ }
430
+
431
+
432
+
395
433
  module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, duration, envTarget) => {
396
434
  utils.tools.logBanner('STORE METADATA');
397
435
 
@@ -414,9 +452,11 @@ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, dur
414
452
  }
415
453
 
416
454
 
417
- module.exports.exportPipelineVariables = (pkg) => {
455
+ module.exports.exportPipelineVariables = (pkg, compositeType) => {
418
456
  utils.tools.logBanner('EXPORT PIPELINE VARIABLES');
419
457
 
458
+ let variablesContent = '';
459
+
420
460
  return Promise.resolve()
421
461
  .then(() => {
422
462
  if (pkg.remote) {
@@ -432,11 +472,18 @@ module.exports.exportPipelineVariables = (pkg) => {
432
472
 
433
473
  utils.tools.logInfo(`appTarget generated : ${appTarget}`);
434
474
 
475
+ variablesContent += `export APP_TARGET=${appTarget}\n`;
476
+
477
+ if (compositeType) {
478
+ utils.tools.logInfo(`Exporting COMPOSITE_TYPE : ${compositeType}`);
479
+ variablesContent += `export COMPOSITE_TYPE=${compositeType}\n`;
480
+ }
481
+
435
482
  if (dryRun) {
436
483
  utils.tools.logWarning('dryRun...skipping export');
437
484
  } else {
438
485
  utils.tools.logInfo('Exporting appTarget variable');
439
- return utils.pipeline.setVariables(pkg.paths.rootDirectory, `export APP_TARGET=${pkg.build.appTarget}\n`);
486
+ return utils.pipeline.setVariables(pkg.paths.rootDirectory, variablesContent);
440
487
  }
441
488
  }
442
489
  })
@@ -178,7 +178,7 @@ module.exports.run = () => {
178
178
 
179
179
  // EXPORT ADDITIONAL PIPELINE VARIABLES
180
180
  .then(() => {
181
- return innerCommon.exportPipelineVariables(pkg);
181
+ return innerCommon.exportPipelineVariables(pkg, compositeType);
182
182
  })
183
183
 
184
184