-
Notifications
You must be signed in to change notification settings - Fork 1
/
.versionrc.js
31 lines (28 loc) · 1.26 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
const { execSync } = require("child_process");
let gitBaseUrl = 'https://github.com/';
try {
gitBaseUrl = execSync('git config --get remote.origin.url').toString()
.replace('\n', '')
.replace('git@github.com:', 'https://github.com/')
.replace('.git', '');
}
catch (error) {
console.error('No git repo found, changelog URLs will be incorrect', error);
}
const config = {
"header": "# Changelog \r\n\r\nAll notable changes to this project will be documented in this file. See [Conventional Commits](https://www.conventionalcommits.org) for the commit message format.",
"commitUrlFormat": gitBaseUrl + "/commit/{{hash}}",
"compareUrlFormat": gitBaseUrl + "/compare/{{previousTag}}...{{currentTag}}",
"types": [
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"style","section":"Styling Changes","hidden":false},
{"type":"perf","section":"Performance","hidden":false},
{"type":"docs","section":"Documentation","hidden":false},
{"type":"refactor","section":"Other","hidden":true},
{"type":"chore","section":"Chore","hidden":true},
{"type":"test","section":"Testing","hidden":true}
]
};
console.log('standard-version config:', config);
module.exports = config;