@govbr-ds/release-config 3.3.0-alpha.1 → 3.3.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/package.json +6 -6
- package/semantic-release.cjs +75 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/release-config",
|
|
3
|
-
"version": "3.3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Configuração compartilhada do semantic-release para projetos do GovBR-DS",
|
|
6
6
|
"keywords": [
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
"semantic-release.cjs"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"commit": "git-cz"
|
|
26
|
-
"lint:md": "markdownlint -d --fix **/*.md"
|
|
25
|
+
"commit": "git-cz"
|
|
27
26
|
},
|
|
28
27
|
"config": {
|
|
29
28
|
"commitizen": {
|
|
@@ -32,10 +31,11 @@
|
|
|
32
31
|
},
|
|
33
32
|
"dependencies": {
|
|
34
33
|
"@semantic-release/changelog": "^6.0.3",
|
|
35
|
-
"@semantic-release/commit-analyzer": "^
|
|
34
|
+
"@semantic-release/commit-analyzer": "^12.0.0",
|
|
36
35
|
"@semantic-release/git": "^10.0.1",
|
|
36
|
+
"inquirer": "^9.2.19",
|
|
37
37
|
"@semantic-release/gitlab": "^13.0.3",
|
|
38
|
-
"@semantic-release/release-notes-generator": "^
|
|
39
|
-
"semantic-release": "^23.0.
|
|
38
|
+
"@semantic-release/release-notes-generator": "^13.0.0",
|
|
39
|
+
"semantic-release": "^23.0.8"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/semantic-release.cjs
CHANGED
|
@@ -69,7 +69,8 @@ const releaseNotesGenerator = [
|
|
|
69
69
|
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
70
70
|
},
|
|
71
71
|
writerOpts: {
|
|
72
|
-
|
|
72
|
+
groupBy: 'type',
|
|
73
|
+
commitsSort: ['scope', 'subject', 'header'],
|
|
73
74
|
finalizeContext: (context) => {
|
|
74
75
|
const date = new Date()
|
|
75
76
|
context.date = date.toLocaleString('pt-BR', {
|
|
@@ -78,6 +79,75 @@ const releaseNotesGenerator = [
|
|
|
78
79
|
})
|
|
79
80
|
return context
|
|
80
81
|
},
|
|
82
|
+
mainTemplate: `
|
|
83
|
+
{{> header}}
|
|
84
|
+
|
|
85
|
+
{{#if noteGroups}}
|
|
86
|
+
{{#each noteGroups}}
|
|
87
|
+
|
|
88
|
+
### 💥 {{title}}
|
|
89
|
+
|
|
90
|
+
{{#each notes}}
|
|
91
|
+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
|
|
92
|
+
{{commit.body}}
|
|
93
|
+
{{/each}}
|
|
94
|
+
{{/each}}
|
|
95
|
+
{{/if}}
|
|
96
|
+
{{#each commitGroups}}
|
|
97
|
+
|
|
98
|
+
{{#if title}}
|
|
99
|
+
### {{title}}
|
|
100
|
+
|
|
101
|
+
{{/if}}
|
|
102
|
+
{{#each commits}}
|
|
103
|
+
{{> commit root=@root}}
|
|
104
|
+
{{/each}}
|
|
105
|
+
|
|
106
|
+
{{/each}}
|
|
107
|
+
`,
|
|
108
|
+
commitPartial: `
|
|
109
|
+
*{{#if scope}} **{{scope}}:**
|
|
110
|
+
{{~/if}} {{#if subject}}
|
|
111
|
+
{{~subject}}
|
|
112
|
+
{{~else}}
|
|
113
|
+
{{~header}}
|
|
114
|
+
{{~/if}}
|
|
115
|
+
|
|
116
|
+
{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
|
|
117
|
+
([{{shortHash}}]({{commitUrlFormat}}))
|
|
118
|
+
{{~else}}
|
|
119
|
+
{{~shortHash}}
|
|
120
|
+
{{~/if}}{{~/if}}
|
|
121
|
+
|
|
122
|
+
{{~!-- commit references --}}
|
|
123
|
+
{{~#if references~}}
|
|
124
|
+
, closes
|
|
125
|
+
{{~#each references}} {{#if @root.linkReferences~}}
|
|
126
|
+
[
|
|
127
|
+
{{~#if this.owner}}
|
|
128
|
+
{{~this.owner}}/
|
|
129
|
+
{{~/if}}
|
|
130
|
+
{{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
|
|
131
|
+
{{~else}}
|
|
132
|
+
{{~#if this.owner}}
|
|
133
|
+
{{~this.owner}}/
|
|
134
|
+
{{~/if}}
|
|
135
|
+
{{~this.repository}}{{this.prefix}}{{this.issue}}
|
|
136
|
+
{{~/if}}{{/each}}
|
|
137
|
+
{{~/if}}
|
|
138
|
+
`,
|
|
139
|
+
headerPartial: `
|
|
140
|
+
## {{#if @root.linkCompare~}}
|
|
141
|
+
[{{version}}]({{compareUrlFormat}})
|
|
142
|
+
{{~else}}
|
|
143
|
+
{{~version}}
|
|
144
|
+
{{~/if}}
|
|
145
|
+
{{~#if title}} "{{title}}"
|
|
146
|
+
{{~/if}}
|
|
147
|
+
{{~#if date}} ({{date}})
|
|
148
|
+
{{/if}}
|
|
149
|
+
`,
|
|
150
|
+
footerPartial: ``,
|
|
81
151
|
},
|
|
82
152
|
},
|
|
83
153
|
]
|
|
@@ -94,6 +164,10 @@ const gitlab = [
|
|
|
94
164
|
{
|
|
95
165
|
successComment:
|
|
96
166
|
':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})',
|
|
167
|
+
failComment:
|
|
168
|
+
'A release a partir da branch ${branch.name} falhou devido aos seguintes erros:\n- ${errors.map(err => err.message).join("\\n- ")}',
|
|
169
|
+
failTitle: 'A release automática falhou 🚨',
|
|
170
|
+
labels: 'crítico, precisa-de-triagem, semantic-release',
|
|
97
171
|
},
|
|
98
172
|
]
|
|
99
173
|
|