Skip to content

Commit

Permalink
chore: use recent tag for release notes (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Apr 9, 2021
1 parent c8365cf commit 609d578
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/generateReleaseNotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Example
* ./scripts/generateReleaseNotes.js --from from_tag --to to_tag --compact
*
* When --to is not given HEAD is selected.
* When --from is not given latest tag is selected.
* When --to is not given the latest tag is selected.
* When --from is not given the previous tag is selected.
* When --compact is set, components are not listed, default is false
*/

Expand Down Expand Up @@ -51,12 +51,12 @@ async function getReleases() {
if (!from) {
const branch = await run(`git rev-parse --abbrev-ref HEAD`);
await run(`git pull origin ${branch} --tags`);
const tags = await run(`git tag --merged ${branch} --sort=-committerdate`);
from = tags.split('\n')[0];
const tags = await run(`git tag --merged ${branch} --sort='-*committerdate'`);
from = tags.split('\n')[1];
}

if (!to) {
to = 'HEAD';
to = `v${version}`;
}
}

Expand Down

0 comments on commit 609d578

Please sign in to comment.