@eui/tools 5.0.0-rc.14 → 5.0.0-rc.17

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.14
1
+ 5.0.0-rc.17
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 5.0.0-rc.17 (2022-03-31)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * 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))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.0.0-rc.16 (2022-03-31)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * 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))
16
+
17
+ * * *
18
+ * * *
19
+ ## 5.0.0-rc.15 (2022-03-31)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * **other:**
24
+ * wrong external sources location for remote - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([2c47ddcc](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2c47ddcc1bcddad192e4b5e3be6e45b7f4d64ef0))
25
+
26
+ * * *
27
+ * * *
1
28
  ## 5.0.0-rc.14 (2022-03-31)
2
29
 
3
30
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.0.0-rc.14",
3
+ "version": "5.0.0-rc.17",
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
 
@@ -436,7 +474,7 @@ module.exports.exportPipelineVariables = (pkg) => {
436
474
  utils.tools.logWarning('dryRun...skipping export');
437
475
  } else {
438
476
  utils.tools.logInfo('Exporting appTarget variable');
439
- return utils.pipeline.setVariables(pkg.paths.rootDirectory, `export APP_TARGET=${pkg.build.appTarget}\n`);
477
+ return utils.pipeline.setVariables(pkg.paths.rootDirectory, `export APP_TARGET=${appTarget}\n`);
440
478
  }
441
479
  }
442
480
  })
@@ -163,7 +163,7 @@ module.exports.injectElementExternalSources = (pkg) => {
163
163
  const npmPkgScope = pkg.externalSources.npmPkg.substr(0, pkg.externalSources.npmPkg.indexOf('/'));
164
164
  const npmPkgName = pkg.externalSources.npmPkg.substr(pkg.externalSources.npmPkg.indexOf('/') + 1);
165
165
 
166
- externalSourcesSrcPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName, pkg.externalSources.folder);
166
+ externalSourcesSrcPath = path.join(pkg.paths.pkgRootDirectory, 'node_modules', npmPkgScope, npmPkgName, pkg.externalSources.folder);
167
167
  }
168
168
 
169
169
  if (!tools.isDirExists(externalSourcesSrcPath)) {