-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.versionrc.js
50 lines (47 loc) · 1.41 KB
/
.versionrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const URL = "https://github.com/WuLiFang/Nuke";
const pathLib = require("path");
/**
* 生成工作区路径。
* @param {string[]} parts - 路径部分
* @returns {string} 解析后的绝对路径
*/
function workspacePath(...parts) {
return pathLib.resolve(__dirname, ...parts);
}
/**
* @type {import("standard-version").Options}
* @link https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.1.0/README.md#compareurlformat-string
*/
module.exports = {
types: [
{ type: "feat", section: "Features" },
{ type: "fix", section: "Bug Fixes" },
{ type: "chore", hidden: true },
{ type: "docs", hidden: true },
{ type: "style", hidden: true },
{ type: "refactor", hidden: true },
{ type: "perf", section: "Performance" },
{ type: "test", hidden: true },
],
commitUrlFormat: `${URL}/commit/{{hash}}`,
compareUrlFormat: `${URL}/compare/{{previousTag}}...{{currentTag}}`,
issueUrlFormat: `${URL}/issues/{{id}}`,
userUrlFormat: `https://github.com//{{user}}`,
bumpFiles: [
{
filename: "lib/__version__.py",
updater: "scripts/python-version-updater.js",
},
{
filename: "wulifang/__version__.py",
updater: "scripts/python-version-updater.js",
},
{
filename: "version",
type: "plain-text",
},
],
scripts: {
postchangelog: `bash ${workspacePath("scripts/postchangelog.sh")}`,
},
};