chore: configuration file and script for versioning
See https://github.com/conventional-changelog/standard-versionpull/296/head
parent
a95964b51f
commit
46948f514a
|
@ -0,0 +1,27 @@
|
|||
const tracker = {
|
||||
filename: "Version",
|
||||
updater: require("./Scripts/standard-version-updater.js")
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
tagPrefix: "SOGo-",
|
||||
issueUrlFormat: "https://sogo.nu/bugs/view.php?id={{id}}",
|
||||
compareUrlFormat: "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
|
||||
types: [
|
||||
{type: "feat", section: "Features"},
|
||||
{type: "refactor", section: "Enhancements"},
|
||||
{type: "perf", section: "Enhancements"},
|
||||
{type: "i18n", section: "Localization"},
|
||||
{type: "fix", section: "Bug Fixes"},
|
||||
{type: "chore", hidden: true},
|
||||
{type: "docs", hidden: true},
|
||||
{type: "style", hidden: true},
|
||||
{type: "test", hidden: true}
|
||||
],
|
||||
skip: {
|
||||
commit: true,
|
||||
tag: true
|
||||
},
|
||||
packageFiles: [tracker],
|
||||
bumpFiles: [tracker]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
module.exports.readVersion = function (contents) {
|
||||
// console.debug('readVersion = ' + contents.match(/([0-9]+)/mg).join('.'));
|
||||
return contents.match(/([0-9]+)/mg).join('.');
|
||||
};
|
||||
|
||||
module.exports.writeVersion = function (contents, version) {
|
||||
// console.debug('writeVersion = ' + version);
|
||||
const versions = version.split('.');
|
||||
return "MAJOR_VERSION=" + versions[0] + "\nMINOR_VERSION=" + versions[1] + "\nSUBMINOR_VERSION=" + versions[2];
|
||||
};
|
Loading…
Reference in New Issue