@eui/tools 5.1.10 → 5.1.13
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.
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.13
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## 5.1.13 (2022-04-28)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* broken version generated for remote snapshot - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([21a5afd7](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/21a5afd7c07bcea1c4bed4e0ed7c417667e87673))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 5.1.12 (2022-04-28)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* wrong non-snapshots dependencies resolutions - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([b151196a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b151196a9cb6de530b035cf0d88d03ed80744eaa))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
19
|
+
## 5.1.11 (2022-04-28)
|
|
20
|
+
|
|
21
|
+
##### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **other:**
|
|
24
|
+
* app getCurrent version wrong declaration - EUI-5632 [EUI-5632](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5632) ([28321e68](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/28321e68886f814f49462dec3bf6bfd60fc63088))
|
|
25
|
+
|
|
26
|
+
* * *
|
|
27
|
+
* * *
|
|
1
28
|
## 5.1.10 (2022-04-28)
|
|
2
29
|
|
|
3
30
|
##### Chores
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -823,20 +823,29 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
|
|
|
823
823
|
// console.log(metadata);
|
|
824
824
|
// })
|
|
825
825
|
|
|
826
|
-
Promise.resolve()
|
|
827
|
-
// getting root composite - dependencies-composite.json content
|
|
828
|
-
.then(() => {
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
})
|
|
838
|
-
.then((deps) => {
|
|
839
|
-
|
|
840
|
-
})
|
|
826
|
+
// Promise.resolve()
|
|
827
|
+
// // getting root composite - dependencies-composite.json content
|
|
828
|
+
// .then(() => {
|
|
829
|
+
// const compositeJsonFile = path.join(process.cwd(), 'apps/eui-showcase-dev-guide', 'dependencies-composite.json');
|
|
830
|
+
// var compositeDeps = tools.getJsonFileContent(compositeJsonFile) || {};
|
|
831
|
+
|
|
832
|
+
// if (compositeDeps.dependencies) {
|
|
833
|
+
// return compositeDeps.dependencies;
|
|
834
|
+
// } else {
|
|
835
|
+
// return compositeDeps;
|
|
836
|
+
// }
|
|
837
|
+
// })
|
|
838
|
+
// .then((deps) => {
|
|
839
|
+
// console.log(deps);
|
|
840
|
+
// })
|
|
841
|
+
|
|
841
842
|
|
|
843
|
+
const pkg = configUtils.packages.getPackage('opsys-epc-esub-bo-ui', true);
|
|
842
844
|
|
|
845
|
+
Promise.resolve()
|
|
846
|
+
.then(() => {
|
|
847
|
+
return metadataUtils.package.getPackageVersionsByMajor(pkg, '10', false)
|
|
848
|
+
})
|
|
849
|
+
.then((versions) => {
|
|
850
|
+
console.log(versions);
|
|
851
|
+
})
|
|
@@ -430,6 +430,12 @@ module.exports.getPackageVersionsByMajor = (pkg, major, isMaster) => {
|
|
|
430
430
|
} else {
|
|
431
431
|
versions = versions.filter(v => v.version.indexOf('snapshot') !== -1);
|
|
432
432
|
tools.logInfo(`----> ${versions.length} metadata versions found including snapshots`);
|
|
433
|
+
|
|
434
|
+
if (versions.length === 0) {
|
|
435
|
+
versions = pkgVersions.filter(v => v.version.split('.')[0] === major);
|
|
436
|
+
versions = versions.filter(v => v.version.indexOf('snapshot') === -1);
|
|
437
|
+
tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
|
|
438
|
+
}
|
|
433
439
|
}
|
|
434
440
|
|
|
435
441
|
return versions;
|
|
@@ -10,6 +10,8 @@ const moment = require('moment');
|
|
|
10
10
|
// local
|
|
11
11
|
const tools = require('../../utils/tools');
|
|
12
12
|
|
|
13
|
+
// inner
|
|
14
|
+
const appCommon = require('./app-common');
|
|
13
15
|
|
|
14
16
|
// fetch args
|
|
15
17
|
const { dryRun } = tools.getArgs();
|
|
@@ -21,7 +23,7 @@ const { dryRun } = tools.getArgs();
|
|
|
21
23
|
module.exports.getNewVersion = (project, isSnapshot, isSupportBranch) => {
|
|
22
24
|
return Promise.resolve()
|
|
23
25
|
.then(() => {
|
|
24
|
-
return
|
|
26
|
+
return appCommon.getCurrentVersion(project);
|
|
25
27
|
})
|
|
26
28
|
.then((version) => {
|
|
27
29
|
// if the project has specific version strategy defined
|
|
@@ -7,6 +7,7 @@ const path = require('path');
|
|
|
7
7
|
// local
|
|
8
8
|
const tools = require('../../utils/tools');
|
|
9
9
|
|
|
10
|
+
const RELEASE_TYPES = ['major', 'minor', 'patch'];
|
|
10
11
|
|
|
11
12
|
const getCurrentVersion = (pkg) => {
|
|
12
13
|
return Promise.resolve()
|
|
@@ -51,36 +52,6 @@ const getCurrentVersion = (pkg) => {
|
|
|
51
52
|
})
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
const getReleaseType = (commitsMetadata) => {
|
|
56
|
-
tools.logInfo('Getting release type based on commits metadata parsed from last tag');
|
|
57
|
-
|
|
58
|
-
const RELEASE_TYPES = ['major', 'minor', 'patch'];
|
|
59
|
-
|
|
60
|
-
let level = 2;
|
|
61
|
-
let breakings = 0;
|
|
62
|
-
let features = 0;
|
|
63
|
-
|
|
64
|
-
commitsMetadata.forEach((commit) => {
|
|
65
|
-
if (commit.breakingChange) {
|
|
66
|
-
breakings += commit.body;
|
|
67
|
-
level = 1; // no major bump on "breaking changes"
|
|
68
|
-
} else if (commit.type === 'feat') {
|
|
69
|
-
features += 1;
|
|
70
|
-
if (level === 2) {
|
|
71
|
-
level = 1;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
level: level,
|
|
78
|
-
reason: 'There are ' + breakings + ' BREAKING CHANGES and ' + features + ' features',
|
|
79
|
-
releaseType: RELEASE_TYPES[level]
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
55
|
// PUBLIC METHODS
|
|
85
56
|
|
|
86
57
|
module.exports.getNewVersion = (
|
|
@@ -101,7 +72,31 @@ module.exports.getNewVersion = (
|
|
|
101
72
|
let newVersion = '1.0.0';
|
|
102
73
|
|
|
103
74
|
if (commits) {
|
|
104
|
-
|
|
75
|
+
|
|
76
|
+
tools.logInfo('Commits found for processing version, extracting...');
|
|
77
|
+
|
|
78
|
+
let level = 2;
|
|
79
|
+
let breakings = 0;
|
|
80
|
+
let features = 0;
|
|
81
|
+
|
|
82
|
+
commits.forEach((commit) => {
|
|
83
|
+
if (commit.breakingChange) {
|
|
84
|
+
breakings += commit.body;
|
|
85
|
+
level = 1; // no major bump on "breaking changes"
|
|
86
|
+
} else if (commit.type === 'feat') {
|
|
87
|
+
features += 1;
|
|
88
|
+
if (level === 2) {
|
|
89
|
+
level = 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const release = {
|
|
95
|
+
level: level,
|
|
96
|
+
reason: 'There are ' + breakings + ' BREAKING CHANGES and ' + features + ' features',
|
|
97
|
+
releaseType: RELEASE_TYPES[level]
|
|
98
|
+
};
|
|
99
|
+
|
|
105
100
|
tools.logInfo('release info found : ' + JSON.stringify(release));
|
|
106
101
|
|
|
107
102
|
if (isNextBranch) {
|
|
@@ -110,37 +105,39 @@ module.exports.getNewVersion = (
|
|
|
110
105
|
newVersion = semver.valid(release.releaseType) || semver.inc(currentVersion, release.releaseType)
|
|
111
106
|
}
|
|
112
107
|
|
|
113
|
-
tools.logInfo('probable new version : ' + newVersion);
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (pkg.build && pkg.build.nodejs) {
|
|
118
|
-
newVersion += '-snapshot-' + Date.now();
|
|
119
|
-
} else {
|
|
120
|
-
newVersion += '-SNAPSHOT';
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
newVersion += '-snapshot-' + Date.now();
|
|
124
|
-
}
|
|
109
|
+
} else {
|
|
110
|
+
tools.logInfo('No commits found for version processing...applying minor version upgrade');
|
|
125
111
|
|
|
126
|
-
|
|
127
|
-
if (pkg.backend) {
|
|
112
|
+
if (isNextBranch) {
|
|
128
113
|
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
114
|
+
} else {
|
|
115
|
+
newVersion = semver.inc(currentVersion, 'minor');
|
|
129
116
|
}
|
|
130
|
-
|
|
131
|
-
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
132
|
-
}
|
|
117
|
+
}
|
|
133
118
|
|
|
134
|
-
|
|
135
|
-
tools.logInfo('No commits found for version processing...applying minor version upgrade');
|
|
119
|
+
tools.logInfo('probable new version : ' + newVersion);
|
|
136
120
|
|
|
137
|
-
|
|
138
|
-
|
|
121
|
+
if (isSnapshot) {
|
|
122
|
+
if (pkg.backend) {
|
|
123
|
+
if (pkg.build && pkg.build.nodejs) {
|
|
124
|
+
newVersion += '-snapshot-' + Date.now();
|
|
125
|
+
} else {
|
|
126
|
+
newVersion += '-SNAPSHOT';
|
|
127
|
+
}
|
|
139
128
|
} else {
|
|
140
|
-
newVersion
|
|
129
|
+
newVersion += '-snapshot-' + Date.now();
|
|
141
130
|
}
|
|
142
131
|
}
|
|
143
132
|
|
|
133
|
+
if (isSupportBranch && pkg.backend) {
|
|
134
|
+
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (isHotfixBranch) {
|
|
138
|
+
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
139
|
+
}
|
|
140
|
+
|
|
144
141
|
tools.logSuccess('new version generated : ' + newVersion);
|
|
145
142
|
|
|
146
143
|
return newVersion;
|