@soul-rat/standard-version-updater-pom
v1.2.0
Published
standard-version 修改 pom 文件中的版本
Downloads
4
Readme
standard-version-updater-pom
conventional-changelog/standard-version 版本管理工具 pom篇
安装
- 在根目录创建
package.json
.
{
"devDependencies": {
"@soul-rat/standard-version-updater-pom": "^${latest}",
"xmlbuilder2": "^2.4.1"
}
}
- 安装npm包
$ npm install --save-dev @soul-rat/standard-version-updater-pom
配置
- 根目录创建
.versionrc.js
.
// .versionrc.js
const xmlUpdater = require('@soul-rat/standard-version-updater-pom');
const xmlTracker1 = {
filename: 'pom.xml',
updater: xmlUpdater,
};
//如果是多模块,就添加多个xmlTracker
const xmlTracker2 = {
filename: 'spring-web/pom.xml',
updater: xmlUpdater,
};
const xmlTracker3 = {
filename: 'spring-biz/pom.xml',
updater: xmlUpdater,
};
const xmlTracker4 = {
filename: 'spring-common/pom.xml',
updater: xmlUpdater,
};
const xmlTracker5 = {
filename: 'spring-dal/pom.xml',
updater: xmlUpdater,
};
module.exports = {
packageFiles: [xmlTracker1, xmlTracker2, xmlTracker3, xmlTracker4, xmlTracker5],
bumpFiles: [xmlTracker1, xmlTracker2, xmlTracker3, xmlTracker4, xmlTracker5],
};
- 执行对应的 standard-version 命令