@govbr-ds/release-config 1.0.0 → 1.0.1
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 +1 -5
- package/package.json +2 -3
- package/release.config.js +49 -118
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Nessa configuração nós usamos os seguintes plugins:
|
|
|
16
16
|
|
|
17
17
|
- [`@semantic-release/commit-analyzer`](https://github.com/semantic-release/commit-analyzer)
|
|
18
18
|
- [`@semantic-release/release-notes-generator`](https://github.com/semantic-release/release-notes-generator)
|
|
19
|
+
- [`@semantic-release/npm`](https://github.com/semantic-release/npm)
|
|
19
20
|
- [`@semantic-release/changelog`](https://github.com/semantic-release/changelog)
|
|
20
21
|
- [`@semantic-release/gitlab`](https://github.com/semantic-release/gitlab)
|
|
21
22
|
|
|
@@ -23,11 +24,6 @@ Nessa configuração nós usamos os seguintes plugins:
|
|
|
23
24
|
|
|
24
25
|
A configuração compartilhada pode ser configurada conforme o [arquivo de configuração do semantic-release](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
|
|
25
26
|
|
|
26
|
-
```yml
|
|
27
|
-
---
|
|
28
|
-
extends: "@govbr-ds/release-config"
|
|
29
|
-
```
|
|
30
|
-
|
|
31
27
|
### Configuração
|
|
32
28
|
|
|
33
29
|
Consulta a documentação de cada [plugin](#plugins) para entender o passo-a-passo para extender a configuração padrão.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/release-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Configuração compartilhada do semantic-release para projetos do GOVBR-DS no gitlab",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gitlab",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
27
|
"commit": "git-cz",
|
|
28
|
-
"prepare": "husky install"
|
|
29
|
-
"semantic-release": "semantic-release"
|
|
28
|
+
"prepare": "husky install"
|
|
30
29
|
},
|
|
31
30
|
"config": {
|
|
32
31
|
"commitizen": {
|
package/release.config.js
CHANGED
|
@@ -35,136 +35,67 @@ module.exports = {
|
|
|
35
35
|
{
|
|
36
36
|
preset: 'conventionalcommits',
|
|
37
37
|
releaseRules: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: 'docs',
|
|
56
|
-
release: 'patch',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: 'feat',
|
|
60
|
-
release: 'minor',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
type: 'fix',
|
|
64
|
-
release: 'patch',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
type: 'perf',
|
|
68
|
-
release: 'patch',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'refactor',
|
|
72
|
-
release: 'patch',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: 'removed',
|
|
76
|
-
release: 'minor',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
type: 'revert',
|
|
80
|
-
release: 'minor',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: 'style',
|
|
84
|
-
release: false,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: 'test',
|
|
88
|
-
release: false,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: 'wip',
|
|
92
|
-
release: false,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
scope: 'no-release',
|
|
96
|
-
release: false,
|
|
97
|
-
},
|
|
38
|
+
// breaking precisa estar no topo devido a como o plugin se comporta: https://github.com/semantic-release/commit-analyzer#releaserules
|
|
39
|
+
{ breaking: true, release: 'major' },
|
|
40
|
+
{ type: 'build', release: false },
|
|
41
|
+
{ type: 'chore', release: false },
|
|
42
|
+
{ type: 'ci', release: false },
|
|
43
|
+
{ type: 'deprecated', release: false },
|
|
44
|
+
{ type: 'docs', release: 'patch' },
|
|
45
|
+
{ type: 'feat', release: 'minor' },
|
|
46
|
+
{ type: 'fix', release: 'patch' },
|
|
47
|
+
{ type: 'perf', release: 'patch' },
|
|
48
|
+
{ type: 'refactor', release: 'patch' },
|
|
49
|
+
{ type: 'removed', release: 'patch' },
|
|
50
|
+
{ type: 'revert', release: 'minor' },
|
|
51
|
+
{ type: 'style', release: false },
|
|
52
|
+
{ type: 'test', release: false },
|
|
53
|
+
{ type: 'wip', release: false },
|
|
54
|
+
{ scope: 'no-release', release: false },
|
|
98
55
|
],
|
|
56
|
+
parserOpts: {
|
|
57
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
58
|
+
},
|
|
99
59
|
},
|
|
100
60
|
],
|
|
101
61
|
[
|
|
102
62
|
'@semantic-release/release-notes-generator',
|
|
103
63
|
{
|
|
104
64
|
preset: 'conventionalcommits',
|
|
105
|
-
|
|
106
|
-
|
|
65
|
+
presetConfig: {
|
|
66
|
+
header: '# CHANGELOG',
|
|
67
|
+
// O release notes/changelog vai ser gerado nessa ordem
|
|
107
68
|
types: [
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
type: 'docs',
|
|
126
|
-
section: 'Documentação',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
type: 'feat',
|
|
130
|
-
section: 'Novidades',
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
type: 'fix',
|
|
134
|
-
section: 'Correções',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'perf',
|
|
138
|
-
section: 'Performance',
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
type: 'refactor',
|
|
142
|
-
section: 'Refatorado',
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
type: 'removed',
|
|
146
|
-
section: 'Removido',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
type: 'revert',
|
|
150
|
-
section: 'Revertido/Rollback',
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
type: 'style',
|
|
154
|
-
hidden: true,
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
type: 'test',
|
|
158
|
-
hidden: true,
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
type: 'wip',
|
|
162
|
-
hidden: true,
|
|
163
|
-
},
|
|
69
|
+
{ type: 'breaking', section: ':boom: Breaking Changes' },
|
|
70
|
+
{ type: 'deprecated', section: ':wastebasket: Depreciado' },
|
|
71
|
+
{ type: 'feat', section: ':new: Novidades' },
|
|
72
|
+
{ type: 'removed', section: ':fire: Removido' },
|
|
73
|
+
{ type: 'docs', section: ':memo: Documentação' },
|
|
74
|
+
{ type: 'fix', section: ':bug: Correções' },
|
|
75
|
+
{ type: 'perf', section: ':zap: Performance' },
|
|
76
|
+
{ type: 'refactor', section: ':recycle: Refatorado' },
|
|
77
|
+
{ type: 'revert', section: ':rewind: Revertido/Rollback' },
|
|
78
|
+
{ type: 'build', hidden: true },
|
|
79
|
+
{ type: 'chore', hidden: true },
|
|
80
|
+
{ type: 'ci', hidden: true },
|
|
81
|
+
{ type: 'style', hidden: true },
|
|
82
|
+
{ type: 'test', hidden: true },
|
|
83
|
+
{ type: 'wip', hidden: true },
|
|
164
84
|
],
|
|
165
85
|
},
|
|
86
|
+
parserOpts: {
|
|
87
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
88
|
+
},
|
|
166
89
|
writerOpts: {
|
|
167
90
|
commitsSort: ['subject', 'scope'],
|
|
91
|
+
finalizeContext: (context) => {
|
|
92
|
+
const date = new Date()
|
|
93
|
+
const day = date.getDate()
|
|
94
|
+
const month = date.getMonth() + 1
|
|
95
|
+
const year = date.getFullYear()
|
|
96
|
+
context.date = `${day}/${month}/${year}`
|
|
97
|
+
return context
|
|
98
|
+
},
|
|
168
99
|
},
|
|
169
100
|
},
|
|
170
101
|
],
|