conventional-changelog
conventional-changelog copied to clipboard
Support for custom tag pattern
hey all,
currently i am not sure if there is a way to support custom tag pattern ,
for eg
the following semvar tags are used in application
v1.23.0-app-sandbox
v1.23.0-app-production
v2.1.0-admin-app-sandbox
v2.1.0-admin-app-production
how can i get the changelog for tag with pattern v1.23.0-app-production i.,e, regex,
/*+-app-production$/
is there a way to do it ? shall i put up a PR thats solves this problem?
lemme know,
thanks
As we track the major version of the CMS we are working with I will also need the option of a custom pattern: v10.0.0.0 (the 10 being the version of the CMS). Is that possible? If so, how?
hey all,
currently i am not sure if there is a way to support custom tag pattern , for eg the following semvar tags are used in application v1.23.0-app-sandbox v1.23.0-app-production v2.1.0-admin-app-sandbox v2.1.0-admin-app-production how can i get the changelog for tag with pattern v1.23.0-app-production i.,e, regex,
/*+-app-production$/
is there a way to do it ? shall i put up a PR thats solves this problem? lemme know, thanks
I meet the same problem, did you solved it?
Hi, I found a solution and you can have a try.
You can custom the function generateOn
like this:
conventionalChangelog(
{
preset: "angular",
append: false,
releaseCount: 0,
currentTag: tag
},
{
linkReferences: false,
repoUrl: "",
issue: "",
repository: "",
owner: "terminus",
host: "",
currentTag: tag,
},
{},
{},
{
headerPartial: changeLogHeader,
isPatch: true,
doFlush: false,
generateOn: function(commit) {
// write your own logic
// you can write regex here
return commit.version
}
}
)
.pipe(fs.createWriteStream("./CHANGELOG.md"))
.on("finish", resolve)
});
let gitRawCommitsOpts = {
from: 'v2.1.0-admin-app-sandbox'
}
module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts, gitRawCommitsOpts])
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts, gitRawCommitsOpts) => {
return { context, conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts, gitRawCommitsOpts }
})