@eui/tools 6.20.9 → 6.20.11

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
- 6.20.9
1
+ 6.20.11
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.20.11 (2024-08-07)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * adapted MSTEAMS notifications to standalone pkg build - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([945f63da](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/945f63da34d51d32b73a4a7d6cd310f5a02cc088))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.20.10 (2024-08-07)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * force branch checkout for git operations for standalone pkg build - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([05d33d10](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/05d33d10fb8e62319d16782bd4b438bbb1651434))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.20.9 (2024-08-07)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.20.9",
3
+ "version": "6.20.11",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -468,7 +468,8 @@ const commitPackage = (pkg, version, branches) => {
468
468
  return utils.git.commitAndPush(
469
469
  branches.branch,
470
470
  `chore(release): update version: ${version} - from CI server [skip ci]`,
471
- pkg.paths.root
471
+ pkg.paths.root,
472
+ pkg.standalone
472
473
  );
473
474
  })
474
475
  .catch((e) => {
@@ -78,16 +78,24 @@ const hasCommitsSinceLastTag = (folder, version) => {
78
78
  }
79
79
  }
80
80
 
81
- const commitAndPushCore = (branch, message, folder) => {
82
- execa.sync('git', ['add', '.'], { cwd: folder, stdio: 'inherit' });
83
- execa.sync('git', ['commit', '-m', message], { cwd: folder, stdio: 'inherit' });
84
- execa.sync('git', ['checkout', branch], { cwd: folder, stdio: 'inherit' });
85
- execa.sync('git', ['pull', 'origin', branch], { cwd: folder, stdio: 'inherit' });
86
- execa.sync('git', ['push', 'origin', branch], { cwd: folder, stdio: 'inherit' });
81
+ const commitAndPushCore = (branch, message, folder, standalone = false) => {
82
+ if (standalone) {
83
+ execa.sync('git', ['checkout', branch], { cwd: folder, stdio: 'inherit' });
84
+ execa.sync('git', ['add', '.'], { cwd: folder, stdio: 'inherit' });
85
+ execa.sync('git', ['commit', '-m', message], { cwd: folder, stdio: 'inherit' });
86
+ execa.sync('git', ['pull', 'origin', branch], { cwd: folder, stdio: 'inherit' });
87
+ execa.sync('git', ['push', 'origin', branch], { cwd: folder, stdio: 'inherit' });
88
+ } else {
89
+ execa.sync('git', ['add', '.'], { cwd: folder });
90
+ execa.sync('git', ['commit', '-m', message], { cwd: folder });
91
+ execa.sync('git', ['checkout', branch], { cwd: folder });
92
+ execa.sync('git', ['pull', 'origin', branch], { cwd: folder });
93
+ execa.sync('git', ['push', 'origin', branch], { cwd: folder });
94
+ }
87
95
  }
88
96
 
89
97
  // double-run in case of race-condition of 2 pkg built and trying to push as the same time
90
- const commitAndPush = (branch, message, folder) => {
98
+ const commitAndPush = (branch, message, folder, standalone = false) => {
91
99
  tools.logTitle('Commit and pushing files');
92
100
  tools.logInfo(`on branch : ${branch} / folder provided : ${folder}`);
93
101
 
@@ -98,7 +106,7 @@ const commitAndPush = (branch, message, folder) => {
98
106
 
99
107
  try {
100
108
  tools.logInfo('commit and push - first try');
101
- commitAndPushCore(branch, message, folder);
109
+ commitAndPushCore(branch, message, folder, standalone);
102
110
 
103
111
  } catch (e2) {
104
112
  tools.logError('ERROR');
@@ -44,7 +44,7 @@ module.exports.pushMessage = (message) => {
44
44
  }
45
45
 
46
46
 
47
- const sendMessage = (config) => {
47
+ const sendMessage = (config, standalone = false) => {
48
48
  if (config.CLIENT === 'SLACK') {
49
49
  return Promise.resolve();
50
50
  }
@@ -52,7 +52,7 @@ const sendMessage = (config) => {
52
52
  return Promise.resolve()
53
53
  .then(() => {
54
54
  if (config.CLIENT === 'MSTEAMS') {
55
- return innerTeamsUtils.sendMessage(config, messageContent);
55
+ return innerTeamsUtils.sendMessage(config, messageContent, standalone);
56
56
  }
57
57
  })
58
58
  .catch((e) => {
@@ -71,7 +71,7 @@ module.exports.sendPackageMessage = (pkg) => {
71
71
 
72
72
  return Promise.resolve()
73
73
  .then(() => {
74
- return sendMessage(config);
74
+ return sendMessage(config, pkg.standalone);
75
75
  })
76
76
  .catch((e) => {
77
77
  throw e;
@@ -180,7 +180,7 @@ const createPayload = (messageContent) => {
180
180
  }
181
181
 
182
182
 
183
- module.exports.sendMessage = (config, messageContent) => {
183
+ module.exports.sendMessage = (config, messageContent, standalone = false) => {
184
184
  tools.logTitle('Sending MS teams message');
185
185
 
186
186
  const channelHook = getChannelHook(config.MSTEAMS_CHANNEL);
@@ -198,7 +198,13 @@ module.exports.sendMessage = (config, messageContent) => {
198
198
 
199
199
  return Promise.resolve()
200
200
  .then(() => {
201
- const host = configUtils.global.getConfigOptions().MSTEAMS_HOST;
201
+ let host;
202
+
203
+ if (standalone) {
204
+ host = configUtils.global.getConfigOptionsStandalone().MSTEAMS_HOST;
205
+ } else {
206
+ host = configUtils.global.getConfigOptions().MSTEAMS_HOST;
207
+ }
202
208
 
203
209
  return apiUtils.post(host, channelHook, JSON.parse(JSON.stringify(payload, null, 2)));
204
210
  })