Skip to content

Commit

Permalink
chore: cherry-pick latest changes from 17.0 (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo authored Nov 16, 2020
1 parent ed24e9b commit 7fa86ce
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
17 changes: 15 additions & 2 deletions scripts/generateChangeLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ function parseLog(log) {
commit.skip = !commit.breaking && !/(feat|fix|perf)/.test(commit.type);
commit.isIncluded = !commit.skip;
commit.title += result[3];
if (commit.type == 'chore' && /Update.*(NpmPackages|Webjar)/i.test(commit.title)) {
commit.title = 'Increase Web-Component version';
commit.skip = false;
commit.isIncluded = true;
}
} else {
commit.title += line;
}
Expand Down Expand Up @@ -289,7 +294,7 @@ function getTickets(c) {
function logCommit(c, withComponents) {
let log = ' - ' + parseLinks(c.commit.substring(0, 7) + ' ' + c.title[0].toUpperCase() + c.title.slice(1));;
const tickets = getTickets(c);
tickets && (log += `. ${tickets}`);
tickets && (log += `. ${tickets}`);
if (compact) {
const components = getComponents(c);
components && (log += `. ${components}`);
Expand Down Expand Up @@ -340,10 +345,18 @@ function generateReleaseNotes(commits) {
console.log(`
## Vaadin ${product} V${version}
This is a release of the Java integration for [Vaadin Components](https://github.com/vaadin/vaadin) to be used from the Java server side with [Vaadin Flow](https://vaadin.com/flow).
### Changes in ${product} from [${from}](https://github.com/vaadin/vaadin-flow-components/releases/tag/${from})
`)

const includedCommits = commits.filter(c => c.isIncluded);
if (includedCommits.length) {
console.log(`
### Changes in ${product} from [${from}](https://github.com/vaadin/vaadin-flow-components/releases/tag/${from})
`)
} else {
console.log(`
### There are no Changes in ${product} since [${from}](https://github.com/vaadin/vaadin-flow-components/releases/tag/${from})
`)
}
if (compact) {
logCommitsByType(includedCommits);
} else {
Expand Down
18 changes: 15 additions & 3 deletions scripts/getVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,24 @@ async function main() {
return getVersions(isMaster ? 'master' : branch).then(json => {
return ['core', 'vaadin'].reduce((prev, k) => {
return prev.concat(Object.keys(json[k]).filter(pkg => /\-/.test(pkg) && json[k][pkg].javaVersion).map(pkg => {
const branch = json[k][pkg].javaVersion.replace('{{version}}', 'master').replace(/^(\d+\.\d+).*$/, '$1');
return `${pkg === 'iron-list' ? 'vaadin-' + pkg : pkg}-flow-parent:${branch}`
const version = json[k][pkg].javaVersion;
const branch = version.replace('{{version}}', 'master').replace(/^(\d+\.\d+).*$/, '$1');
return `${pkg === 'iron-list' ? 'vaadin-' + pkg : pkg}-flow-parent:${branch}:${version}`
}));
}, []);
});

}

main().then(arr => console.log(arr.join('\n')));
main().then(arr => {
if (process.argv[2] == '--json') {
const o = {};
arr.forEach(line => {
const e = line.split(':');
o[e[0]] = e[1];
});
console.log(JSON.stringify(o));
} else {
console.log(arr.join('\n'))
}
});
6 changes: 4 additions & 2 deletions scripts/mergeITs.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ async function createPom() {
const prev = await prevP;
const id = name.replace('-flow-parent', '');
// Add component-flow and component-testbench dependencies
addDependency(prev, 'com.vaadin', `${id}-flow`, '${project.version}');
addDependency(prev, 'com.vaadin', `${id}-testbench`, '${project.version}', 'test');
const componentVersion = /^(14\.[3-4]|17\.0)/.test(version) ? `\$\{${id.replace(/-/g, '.')}.version\}` : '${project.version}'
addDependency(prev, 'com.vaadin', `${id}-flow`, `${componentVersion}`);
addDependency(prev, 'com.vaadin', `${id}-testbench`, `${componentVersion}`, 'test');
// Read original IT dependencies in master and add them
const js = await xml2js.parseStringPromise(fs.readFileSync(`${name}/${id}-flow-integration-tests/pom.xml`, 'utf8'))
js.project.dependencies[0].dependency.forEach(dep => {
Expand All @@ -87,6 +88,7 @@ async function createPom() {
tplJs.project.artifactId = ['vaadin-flow-components-integration-tests'];
tplJs.project.parent[0].artifactId = ['vaadin-flow-components'];
tplJs.project.parent[0].version = [version];
delete tplJs.project.version;
const tests = tplJs.project.build[0].plugins[0].plugin.find(p => p.artifactId[0] === 'maven-failsafe-plugin');
tests.configuration = [{excludes: [{exclude: exclude}]}]
if (!fs.existsSync(itFolder)) {
Expand Down

0 comments on commit 7fa86ce

Please sign in to comment.