Skip to content

Commit

Permalink
fix(.changelogrc.js): exclude pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Jan 2, 2021
1 parent f2e971e commit c24773e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .changelogrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const debug = require('debug')(
);

const escapeRegExpStr = require('escape-string-regexp');
const semverValid = require('semver').valid;
const semver = require('semver');
const sjx = require('shelljs');

// ? Commit types that trigger releases by default (using angular configuration)
Expand Down Expand Up @@ -70,7 +70,10 @@ module.exports = {
writerOpts: {
generateOn: (commit) => {
const decision =
shouldGenerate === 'always' || (shouldGenerate && !!semverValid(commit.version));
shouldGenerate === 'always' ||
(shouldGenerate &&
!!semver.valid(commit.version) &&
!semver.prerelease(commit.version));
debug(`::generateOn shouldGenerate=${shouldGenerate} decision=${decision}`);
shouldGenerate = true;
return decision;
Expand Down

0 comments on commit c24773e

Please sign in to comment.