@eui/tools 5.3.52 → 5.3.54

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.3.52
1
+ 5.3.54
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 5.3.54 (2022-09-21)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * store backend metadata in repository instead of devops-metadata - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([1fbd3dbe](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1fbd3dbe87d79381e18c6c52ab5aba05849b1233))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.3.53 (2022-09-21)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * git rebase if conflicts during metadata push - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([fa7552be](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/fa7552be262b169c6bf0a086f5e8e0f23c61ef6d))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 5.3.52 (2022-09-21)
2
20
 
3
21
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.3.52",
3
+ "version": "5.3.54",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -41,7 +41,13 @@ module.exports.storeMetadata = (pkg, pkgVersion, pkgCompositeDeps, duration, env
41
41
  var generatedMetadata = {};
42
42
  var versions = [];
43
43
 
44
- const pkgMetadataFile = path.join(configOptions.DEVOPS_METADATA_PATH, pkg.devopsVersionsMetadataFile);
44
+ let pkgMetadataFile;
45
+
46
+ if (pkg.backend) {
47
+ pkgMetadataFile = path.join(pkg.paths.pkgDirectory, 'package-versions-metadata.json');
48
+ } else {
49
+ pkgMetadataFile = path.join(configOptions.DEVOPS_METADATA_PATH, pkg.devopsVersionsMetadataFile);
50
+ }
45
51
 
46
52
  if (tools.isFileExists(pkgMetadataFile)) {
47
53
  generatedMetadata = require(pkgMetadataFile);
@@ -293,14 +293,20 @@ module.exports.storeMetadata = (
293
293
  const storeBuildMetadata = (pkg, pkgVersion, pkgMetadata, envTarget) => {
294
294
  return Promise.resolve()
295
295
  .then(() => {
296
- tools.logInfo('Storing package LATEST metadata...');
296
+ tools.logInfo('Storing package BUILD metadata...');
297
297
 
298
298
  const configOptions = configUtils.global.getConfigOptions();
299
299
 
300
300
  var generatedMetadata = {};
301
301
  var versions = [];
302
302
 
303
- const pkgMetadataFile = path.join(configOptions.DEVOPS_METADATA_PATH, pkg.devopsMetadataFile);
303
+ let pkgMetadataFile;
304
+
305
+ if (pkg.backend) {
306
+ pkgMetadataFile = path.join(pkg.paths.pkgDirectory, 'package-build-metadata.json');
307
+ } else {
308
+ pkgMetadataFile = path.join(configOptions.DEVOPS_METADATA_PATH, pkg.devopsMetadataFile);
309
+ }
304
310
 
305
311
  if (tools.isFileExists(pkgMetadataFile)) {
306
312
  generatedMetadata = require(pkgMetadataFile);
@@ -150,31 +150,58 @@ module.exports.run = () => {
150
150
  })
151
151
 
152
152
 
153
- // GIT OPERATIONS
154
153
  .then(() => {
155
- return innerCommon.runGitOperations(pkg, newVersion);
156
- })
154
+ if (pkg.backend) {
157
155
 
156
+ return Promise.resolve()
157
+ // STORING CENTRALIZED METADATA
158
+ .then(() => {
159
+ // get run duration
160
+ const duration = utils.pipeline.getTimerDuration();
161
+ return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
162
+ })
158
163
 
159
- // STORING CENTRALIZED METADATA
160
- .then(() => {
161
- // get run duration
162
- const duration = utils.pipeline.getTimerDuration();
163
- return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
164
- })
164
+ // GIT OPERATIONS
165
+ .then(() => {
166
+ return innerCommon.runGitOperations(pkg, newVersion);
167
+ })
165
168
 
166
- // STORING PACKAGE HISTORY
167
- .then(() => {
168
- if (branches.isMaster && pkg.remote) {
169
- return innerCommon.generateDiffReport(pkg, newVersion);
170
- }
171
- })
169
+ .catch((e) => {
170
+ throw e;
171
+ })
172
172
 
173
- // COMMITING METADATA
174
- .then(() => {
175
- return innerCommon.commitMetadata(pkg, newVersion);
176
- })
173
+ } else {
177
174
 
175
+ return Promise.resolve()
176
+ // GIT OPERATIONS
177
+ .then(() => {
178
+ return innerCommon.runGitOperations(pkg, newVersion);
179
+ })
180
+
181
+ // STORING CENTRALIZED METADATA
182
+ .then(() => {
183
+ // get run duration
184
+ const duration = utils.pipeline.getTimerDuration();
185
+ return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
186
+ })
187
+
188
+ // STORING PACKAGE HISTORY
189
+ .then(() => {
190
+ if (branches.isMaster && pkg.remote) {
191
+ return innerCommon.generateDiffReport(pkg, newVersion);
192
+ }
193
+ })
194
+
195
+ // COMMITING METADATA
196
+ .then(() => {
197
+ return innerCommon.commitMetadata(pkg, newVersion);
198
+ })
199
+
200
+ .catch((e) => {
201
+ throw e;
202
+ })
203
+ }
204
+ })
178
205
 
179
206
  // EXPORT ADDITIONAL PIPELINE VARIABLES
180
207
  .then(() => {
@@ -110,8 +110,8 @@ const commitAndPush = (branch, message, folder) => {
110
110
  }
111
111
 
112
112
  try {
113
- tools.logInfo('Commit and push - second try - retrying pull -X theirs & push');
114
- execa.sync('git', ['pull -X theirs', 'origin', branch], { cwd: folder });
113
+ tools.logInfo('Commit and push - second try - retrying pull rebase & push');
114
+ execa.sync('git', ['pull --rebase', 'origin', branch], { cwd: folder });
115
115
  execa.sync('git', ['push', 'origin', branch], { cwd: folder });
116
116
 
117
117
  } catch (e3) {