@govbr-ds/release-config 2.3.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -62
- package/package.json +11 -30
- package/semantic-release.cjs +109 -0
- package/LICENSE +0 -21
- package/lib/shared.config.js +0 -157
package/README.md
CHANGED
|
@@ -1,82 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GovBR-DS - Config Tools
|
|
2
2
|
|
|
3
3
|
## Objetivo
|
|
4
4
|
|
|
5
|
-
Compartilhar os padrões de
|
|
5
|
+
Compartilhar os padrões de geração de release entre os projetos do [GovBR-DS](https://gitlab.com/govbr-ds 'GovBR-DS').
|
|
6
6
|
|
|
7
|
-
## Como instalar
|
|
7
|
+
## Como instalar
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
npm install --save-dev @govbr-ds/release-config
|
|
9
|
+
Configurações para o [Semantic Release](https://github.com/semantic-release/semantic-release).
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
1. Instale os seguintes pacotes:
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install -D @govbr-ds/release-config
|
|
15
|
+
```
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Como configurar
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
1. Crie um arquivo `release.config.js` na raiz do seu projeto e importe os plugins que deseja usar:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- [`@semantic-release/npm`](https://github.com/semantic-release/npm)
|
|
24
|
-
- [`@semantic-release/changelog`](https://github.com/semantic-release/changelog)
|
|
25
|
-
- [`@semantic-release/gitlab`](https://github.com/semantic-release/gitlab)
|
|
21
|
+
```javascript
|
|
22
|
+
const { branches, commitAnalyzer, releaseNotesGenerator, changelog, gitlab, git } = require('./node_modules/@govbr-ds/config-tools/src/semantic-release.cjs')
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
module.exports = {
|
|
25
|
+
branches: branches,
|
|
26
|
+
plugins: [
|
|
27
|
+
commitAnalyzer,
|
|
28
|
+
releaseNotesGenerator,
|
|
29
|
+
changelog,
|
|
30
|
+
gitlab,
|
|
31
|
+
git,
|
|
32
|
+
...
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
```
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Exemplo
|
|
32
|
-
|
|
33
|
-
```javascript
|
|
34
|
-
const sharedConfig = require('@govbr-ds/release-config')
|
|
35
|
-
|
|
36
|
-
module.exports = {
|
|
37
|
-
branches: [...sharedConfig.branches],
|
|
38
|
-
plugins: [
|
|
39
|
-
sharedConfig.plugins.commitAnalyzer,
|
|
40
|
-
sharedConfig.plugins.releaseNotes,
|
|
41
|
-
// Configuração sobrescrita
|
|
42
|
-
[
|
|
43
|
-
'@semantic-release/changelog',
|
|
44
|
-
{
|
|
45
|
-
changelogTitle: '# CHANGELOG',
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
sharedConfig.plugins.gitlab,
|
|
49
|
-
sharedConfig.plugins.npm,
|
|
50
|
-
sharedConfig.plugins.git,
|
|
51
|
-
// Plugin não configurado no padrão (consulte a documentação do plugin para mais detalhes)
|
|
52
|
-
[
|
|
53
|
-
'semantic-release-discord',
|
|
54
|
-
{
|
|
55
|
-
onSuccessTemplate: {
|
|
56
|
-
username: 'Username',
|
|
57
|
-
content: 'A versão v$npm_package_version do projeto LOREM IPSUM já está disponível!',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
],
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Configuração
|
|
66
|
-
|
|
67
|
-
Consulta a documentação de cada [plugin](#plugins) para entender o passo-a-passo para extender a configuração padrão.
|
|
37
|
+
Para sobrescrever alguma configuração siga o padrão do [Semantic Release](https://github.com/semantic-release/semantic-release). A ordem definida será a ordem de execução!
|
|
68
38
|
|
|
69
39
|
## Como contribuir?
|
|
70
40
|
|
|
71
41
|
Antes de abrir um Merge Request tenha em mente algumas informações:
|
|
72
42
|
|
|
73
43
|
- Esse é um projeto opensource e contribuições são bem-vindas.
|
|
74
|
-
- Para facilitar a aprovação da sua contribuição, escolha um título curto, simples e explicativo para o MR, e siga os padrões da nossa [wiki](https
|
|
75
|
-
- Quer contribuir com o projeto? Confira o nosso guia [como contribuir](
|
|
44
|
+
- Para facilitar a aprovação da sua contribuição, escolha um título curto, simples e explicativo para o MR, e siga os padrões da nossa [wiki](https://gov.br/ds/wiki/ 'Wiki').
|
|
45
|
+
- Quer contribuir com o projeto? Confira o nosso guia [como contribuir](../../CONTRIBUTING.md 'Como contribuir?').
|
|
76
46
|
|
|
77
47
|
## Reportar bugs/necessidades
|
|
78
48
|
|
|
79
|
-
Você pode usar as [issues](https://gitlab.com/govbr-ds/govbr-ds-
|
|
49
|
+
Você pode usar as [issues](https://gitlab.com/govbr-ds/tools/govbr-ds-config-tools/-/issues/new) para nos informar os problemas que tem enfrentado ao usar nossa biblioteca ou mesmo o que gostaria que fizesse parte do projeto. Por favor use o modelo que mais se encaixa na sua necessidade e preencha com o máximo de detalhes possível.
|
|
80
50
|
|
|
81
51
|
Nos comprometemos a responder a todas as issues
|
|
82
52
|
|
|
@@ -86,15 +56,13 @@ Nos comprometemos a responder a todas as issues
|
|
|
86
56
|
|
|
87
57
|
Use nossos canais abaixo para obter tirar suas dúvidas:
|
|
88
58
|
|
|
89
|
-
- Site do
|
|
90
|
-
|
|
91
|
-
- Pelo nosso email <govbr-ds@serpro.gov.br>
|
|
59
|
+
- Site do GovBR-DS [http://gov.br/ds](http://gov.br/ds)
|
|
92
60
|
|
|
93
61
|
- Usando nosso canal no discord [https://discord.gg/U5GwPfqhUP](https://discord.gg/U5GwPfqhUP)
|
|
94
62
|
|
|
95
63
|
## Padrão de commits
|
|
96
64
|
|
|
97
|
-
Para mais informações sobre o padrão de commits consulte [a nossa Wiki](https
|
|
65
|
+
Para mais informações sobre o padrão de commits consulte [a nossa Wiki](https://gov.br/ds/wiki/git-gitlab/guias/commit/ 'Padrão de commit').
|
|
98
66
|
|
|
99
67
|
## Licença
|
|
100
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/release-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Configuração compartilhada do semantic-release para projetos do GovBR-DS",
|
|
6
6
|
"keywords": [
|
|
@@ -9,28 +9,21 @@
|
|
|
9
9
|
],
|
|
10
10
|
"homepage": "https://gov.br/ds/",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://gitlab.com/govbr-ds/
|
|
12
|
+
"url": "https://gitlab.com/govbr-ds/tools/govbr-ds-config-tools/issues"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git@gitlab.com:govbr-ds/
|
|
16
|
+
"url": "git@gitlab.com:govbr-ds/tools/govbr-ds-config-tools.git"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"author": "SERPRO
|
|
20
|
-
"main": "
|
|
19
|
+
"author": "SERPRO (http://serpro.gov.br/)",
|
|
20
|
+
"main": "semantic-release.cjs",
|
|
21
21
|
"files": [
|
|
22
|
-
"
|
|
22
|
+
"semantic-release.cjs"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"commit": "git-cz",
|
|
26
|
-
"lint:md": "markdownlint --fix **/*.md
|
|
27
|
-
"prepare": "chmod +x ./node_modules/husky/lib/bin.js && husky install"
|
|
28
|
-
},
|
|
29
|
-
"lint-staged": {
|
|
30
|
-
"*.md": [
|
|
31
|
-
"markdownlint -d -c .markdownlint.yml --fix **/*.md",
|
|
32
|
-
"prettier --write"
|
|
33
|
-
]
|
|
26
|
+
"lint:md": "markdownlint -d --fix **/*.md"
|
|
34
27
|
},
|
|
35
28
|
"config": {
|
|
36
29
|
"commitizen": {
|
|
@@ -38,23 +31,11 @@
|
|
|
38
31
|
}
|
|
39
32
|
},
|
|
40
33
|
"dependencies": {
|
|
41
|
-
"@govbr-ds/release-config": "^2.2.0",
|
|
42
34
|
"@semantic-release/changelog": "^6.0.3",
|
|
35
|
+
"@semantic-release/commit-analyzer": "^11.1.0",
|
|
43
36
|
"@semantic-release/git": "^10.0.1",
|
|
44
|
-
"@semantic-release/gitlab": "^
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"semantic-release": "^22.0.5"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@govbr-ds/commit-config": "latest",
|
|
51
|
-
"git-pull-run": "^1.4.0",
|
|
52
|
-
"husky": "^8.0.3",
|
|
53
|
-
"lint-staged": "^15.0.1",
|
|
54
|
-
"markdownlint-cli": "^0.37.0",
|
|
55
|
-
"prettier": "^3.0.3"
|
|
56
|
-
},
|
|
57
|
-
"engines": {
|
|
58
|
-
"node": ">=18"
|
|
37
|
+
"@semantic-release/gitlab": "^13.0.3",
|
|
38
|
+
"@semantic-release/release-notes-generator": "^12.1.0",
|
|
39
|
+
"semantic-release": "^23.0.2"
|
|
59
40
|
}
|
|
60
41
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
const branches = [
|
|
2
|
+
'main',
|
|
3
|
+
'+([0-9])?(.{+([0-9]),x}).x', //1.x.x
|
|
4
|
+
{ name: 'next', prerelease: 'next' },
|
|
5
|
+
{ name: 'alpha', prerelease: 'alpha' },
|
|
6
|
+
{ name: '+([0-9])?(.{+([0-9]),x}).x-alpha', prerelease: 'alpha' },
|
|
7
|
+
// 'next-major',
|
|
8
|
+
// { name: '+([0-9])?(.{+([0-9]),x}).x-beta', prerelease: 'alpha' },
|
|
9
|
+
// { name: '+([0-9])?(.{+([0-9]),x}).x-rc', prerelease: 'alpha' },
|
|
10
|
+
// { name: 'beta', prerelease: true },
|
|
11
|
+
// { name: 'rc', prerelease: true },
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
const commitAnalyzer = [
|
|
15
|
+
'@semantic-release/commit-analyzer',
|
|
16
|
+
{
|
|
17
|
+
preset: 'conventionalcommits',
|
|
18
|
+
releaseRules: [
|
|
19
|
+
{ breaking: true, release: 'major' },
|
|
20
|
+
{ type: '*!', release: 'major' },
|
|
21
|
+
{ type: 'build', release: false },
|
|
22
|
+
{ type: 'chore', release: false },
|
|
23
|
+
{ type: 'ci', release: false },
|
|
24
|
+
{ type: 'deprecated', release: false },
|
|
25
|
+
{ type: 'docs', release: 'patch' },
|
|
26
|
+
{ type: 'feat', release: 'minor' },
|
|
27
|
+
{ type: 'fix', release: 'patch' },
|
|
28
|
+
{ type: 'ops', release: false },
|
|
29
|
+
{ type: 'perf', release: 'patch' },
|
|
30
|
+
{ type: 'refactor', release: 'patch' },
|
|
31
|
+
{ type: 'removed', release: 'minor' },
|
|
32
|
+
{ type: 'revert', release: 'minor' },
|
|
33
|
+
{ type: 'lint', release: false },
|
|
34
|
+
{ type: 'test', release: false },
|
|
35
|
+
{ type: 'wip', release: false },
|
|
36
|
+
{ scope: 'no-release', release: false },
|
|
37
|
+
],
|
|
38
|
+
parserOpts: {
|
|
39
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
const releaseNotesGenerator = [
|
|
45
|
+
'@semantic-release/release-notes-generator',
|
|
46
|
+
{
|
|
47
|
+
preset: 'conventionalcommits',
|
|
48
|
+
presetConfig: {
|
|
49
|
+
header: '# CHANGELOG',
|
|
50
|
+
types: [
|
|
51
|
+
{ type: 'deprecated', section: '👎 DEPRECIADO' },
|
|
52
|
+
{ type: 'feat', section: '✨ NOVIDADES' },
|
|
53
|
+
{ type: 'removed', section: '🚧 REMOVIDO' },
|
|
54
|
+
{ type: 'docs', section: '📚 DOCUMENTAÇÃO' },
|
|
55
|
+
{ type: 'fix', section: '🐛 CORREÇÕES' },
|
|
56
|
+
{ type: 'ops', section: '🔧 ATIVIDADES OPERACIONAIS' },
|
|
57
|
+
{ type: 'perf', section: '🚀 PERFORMANCE' },
|
|
58
|
+
{ type: 'refactor', section: '🔁 REFATORADO' },
|
|
59
|
+
{ type: 'revert', section: '⏪ REVERTIDO' },
|
|
60
|
+
{ type: 'build', hidden: true },
|
|
61
|
+
{ type: 'chore', hidden: true },
|
|
62
|
+
{ type: 'ci', hidden: true },
|
|
63
|
+
{ type: 'lint', hidden: true },
|
|
64
|
+
{ type: 'test', hidden: true },
|
|
65
|
+
{ type: 'wip', hidden: true },
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
parserOpts: {
|
|
69
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
70
|
+
},
|
|
71
|
+
writerOpts: {
|
|
72
|
+
commitsSort: ['scope', 'subject'],
|
|
73
|
+
finalizeContext: (context) => {
|
|
74
|
+
const date = new Date()
|
|
75
|
+
context.date = date.toLocaleString('pt-BR', {
|
|
76
|
+
timeZone: 'America/Sao_Paulo',
|
|
77
|
+
dateStyle: 'short',
|
|
78
|
+
})
|
|
79
|
+
return context
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
const changelog = [
|
|
86
|
+
'@semantic-release/changelog',
|
|
87
|
+
{
|
|
88
|
+
changelogTitle: '# CHANGELOG',
|
|
89
|
+
},
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
const gitlab = [
|
|
93
|
+
'@semantic-release/gitlab',
|
|
94
|
+
{
|
|
95
|
+
successComment:
|
|
96
|
+
':tada: Issue/Merge Request incluído(a) na versão ${nextRelease.version} :tada:\n\nPara mais detalhes:\n- [GitLab release]($CI_PROJECT_URL/-/releases/${nextRelease.version})\n- [GitLab tag]($CI_PROJECT_URL/-/tags/${nextRelease.version})',
|
|
97
|
+
},
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
const git = [
|
|
101
|
+
'@semantic-release/git',
|
|
102
|
+
{
|
|
103
|
+
assets: ['package.json'],
|
|
104
|
+
message:
|
|
105
|
+
'chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes} \n\nCommit gerado automaticamente durante o processo de release',
|
|
106
|
+
},
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
module.exports = { branches, commitAnalyzer, releaseNotesGenerator, changelog, gitlab, git }
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 SERPRO
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/lib/shared.config.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configurações compartilhadas do semantic-release.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
branches: [
|
|
7
|
-
'main',
|
|
8
|
-
'+([0-9])?(.{+([0-9]),x}).x', //1.x.x
|
|
9
|
-
{
|
|
10
|
-
name: 'next',
|
|
11
|
-
prerelease: 'next',
|
|
12
|
-
},
|
|
13
|
-
// 'next-major',
|
|
14
|
-
// {
|
|
15
|
-
// name: '+([0-9])?(.{+([0-9]),x}).x-rc',
|
|
16
|
-
// prerelease: 'rc',
|
|
17
|
-
// },
|
|
18
|
-
// {
|
|
19
|
-
// name: '+([0-9])?(.{+([0-9]),x}).x-beta',
|
|
20
|
-
// prerelease: 'beta',
|
|
21
|
-
// },
|
|
22
|
-
{
|
|
23
|
-
name: '+([0-9])?(.{+([0-9]),x}).x-alpha',
|
|
24
|
-
prerelease: 'alpha',
|
|
25
|
-
},
|
|
26
|
-
// {
|
|
27
|
-
// name: 'rc',
|
|
28
|
-
// prerelease: 'rc',
|
|
29
|
-
// },
|
|
30
|
-
// {
|
|
31
|
-
// name: 'beta',
|
|
32
|
-
// prerelease: 'beta',
|
|
33
|
-
// },
|
|
34
|
-
{
|
|
35
|
-
name: 'alpha',
|
|
36
|
-
prerelease: 'alpha',
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
plugins: {
|
|
40
|
-
commitAnalyzer: [
|
|
41
|
-
'@semantic-release/commit-analyzer',
|
|
42
|
-
{
|
|
43
|
-
preset: 'conventionalcommits',
|
|
44
|
-
releaseRules: [
|
|
45
|
-
// breaking precisa estar no topo: https://github.com/semantic-release/commit-analyzer#releaserules
|
|
46
|
-
{ breaking: true, release: 'major' },
|
|
47
|
-
{ type: '*!', release: 'major' },
|
|
48
|
-
{ type: 'build', release: false },
|
|
49
|
-
{ type: 'chore', release: false },
|
|
50
|
-
{ type: 'ci', release: false },
|
|
51
|
-
{ type: 'deprecated', release: false },
|
|
52
|
-
{ type: 'docs', release: 'patch' },
|
|
53
|
-
{ type: 'feat', release: 'minor' },
|
|
54
|
-
{ type: 'fix', release: 'patch' },
|
|
55
|
-
{ type: 'ops', release: false },
|
|
56
|
-
{ type: 'perf', release: 'patch' },
|
|
57
|
-
{ type: 'refactor', release: 'patch' },
|
|
58
|
-
{ type: 'removed', release: 'minor' },
|
|
59
|
-
{ type: 'revert', release: 'minor' },
|
|
60
|
-
{ type: 'lint', release: false },
|
|
61
|
-
{ type: 'test', release: false },
|
|
62
|
-
{ type: 'wip', release: false },
|
|
63
|
-
{ scope: 'no-release', release: false },
|
|
64
|
-
],
|
|
65
|
-
parserOpts: {
|
|
66
|
-
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
releaseNotes: [
|
|
71
|
-
'@semantic-release/release-notes-generator',
|
|
72
|
-
{
|
|
73
|
-
preset: 'conventionalcommits',
|
|
74
|
-
presetConfig: {
|
|
75
|
-
header: '# CHANGELOG',
|
|
76
|
-
types: [
|
|
77
|
-
{ type: 'deprecated', section: '👎 DEPRECIADO' },
|
|
78
|
-
{ type: 'feat', section: '✨ NOVIDADES' },
|
|
79
|
-
{ type: 'removed', section: '🚧 REMOVIDO' },
|
|
80
|
-
{ type: 'docs', section: '📚 DOCUMENTAÇÃO' },
|
|
81
|
-
{ type: 'fix', section: '🐛 CORREÇÕES' },
|
|
82
|
-
{ type: 'ops', section: '🔧 ATIVIDADES OPERACIONAIS' },
|
|
83
|
-
{ type: 'perf', section: '🚀 PERFORMANCE' },
|
|
84
|
-
{ type: 'refactor', section: '🔁 REFATORADO' },
|
|
85
|
-
{ type: 'revert', section: '⏪ REVERTIDO' },
|
|
86
|
-
{ type: 'build', hidden: true },
|
|
87
|
-
{ type: 'chore', hidden: true },
|
|
88
|
-
{ type: 'ci', hidden: true },
|
|
89
|
-
{ type: 'lint', hidden: true },
|
|
90
|
-
{ type: 'test', hidden: true },
|
|
91
|
-
{ type: 'wip', hidden: true },
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
parserOpts: {
|
|
95
|
-
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
96
|
-
},
|
|
97
|
-
writerOpts: {
|
|
98
|
-
mainTemplate:
|
|
99
|
-
'{{> header}}\n' +
|
|
100
|
-
'\n' +
|
|
101
|
-
'{{#if noteGroups}}\n' +
|
|
102
|
-
'{{#each noteGroups}}\n' +
|
|
103
|
-
'\n' +
|
|
104
|
-
'### 💥 {{title}}\n' +
|
|
105
|
-
'\n' +
|
|
106
|
-
'{{#each notes}}\n' +
|
|
107
|
-
'* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}\n' +
|
|
108
|
-
'{{/each}}\n' +
|
|
109
|
-
'{{/each}}\n' +
|
|
110
|
-
'{{/if}}\n' +
|
|
111
|
-
'{{#each commitGroups}}\n' +
|
|
112
|
-
'\n' +
|
|
113
|
-
'{{#if title}}\n' +
|
|
114
|
-
'### {{title}}\n' +
|
|
115
|
-
'\n' +
|
|
116
|
-
'{{/if}}\n' +
|
|
117
|
-
'{{#each commits}}\n' +
|
|
118
|
-
'{{> commit root=@root}}\n' +
|
|
119
|
-
'{{/each}}\n' +
|
|
120
|
-
'\n' +
|
|
121
|
-
'{{/each}}\n',
|
|
122
|
-
commitsSort: ['scope', 'subject'],
|
|
123
|
-
finalizeContext: (context) => {
|
|
124
|
-
const date = new Date()
|
|
125
|
-
context.date = date.toLocaleString('pt-BR', {
|
|
126
|
-
timeZone: 'America/Sao_Paulo',
|
|
127
|
-
dateStyle: 'short',
|
|
128
|
-
})
|
|
129
|
-
return context
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
changelog: [
|
|
135
|
-
'@semantic-release/changelog',
|
|
136
|
-
{
|
|
137
|
-
changelogTitle: '# CHANGELOG',
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
gitlab: [
|
|
141
|
-
'@semantic-release/gitlab',
|
|
142
|
-
{
|
|
143
|
-
successComment:
|
|
144
|
-
':tada: Issue/Merge Request incluído(a) na versão ${nextRelease.version} :tada:\n\nPara mais detalhes:\n- [GitLab release]($CI_PROJECT_URL/-/releases/${nextRelease.version})\n- [GitLab tag]($CI_PROJECT_URL/-/tags/${nextRelease.version})',
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
npm: ['@semantic-release/npm'],
|
|
148
|
-
git: [
|
|
149
|
-
'@semantic-release/git',
|
|
150
|
-
{
|
|
151
|
-
assets: ['package.json', 'CHANGELOG.md'],
|
|
152
|
-
message:
|
|
153
|
-
'chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes} \n\nCommit gerado automaticamente durante o processo de release',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
}
|