File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' ) ;
2
- const { promisify } = require ( 'util ' ) ;
2
+ const fs = require ( 'fs ' ) ;
3
3
const dateFormat = require ( 'dateformat' ) ;
4
- const readFileAsync = promisify ( require ( 'fs' ) . readFile ) ;
5
4
6
- // Given a `const` variable `TEMPLATE_DIR` which points to "<semantic-release-gitmoji>/lib/assets/templates"
7
-
8
- // the *.hbs template and partials should be passed as strings of contents
9
- const template = readFileAsync ( path . join ( TEMPLATE_DIR , 'release-notes.hbs' ) ) ;
10
- const commitTemplate = readFileAsync (
11
- path . join ( TEMPLATE_DIR , 'commit-template.hbs' )
12
- ) ;
5
+ const template = path . resolve ( __dirname , 'release-notes.hbs' ) ;
13
6
14
7
module . exports = {
15
8
plugins : [
@@ -19,11 +12,10 @@ module.exports = {
19
12
releaseRules : {
20
13
major : [ ':boom:' ] ,
21
14
minor : [ ':sparkles:' ] ,
22
- patch : [ ':bug:' , ':ambulance:' , ':lock :']
15
+ patch : [ ':bug:' , ':package :' ]
23
16
} ,
24
17
releaseNotes : {
25
- template,
26
- partials : { commitTemplate } ,
18
+ template : fs . readFileSync ( template , 'utf8' ) ,
27
19
helpers : {
28
20
datetime : function ( format = 'UTC:yyyy-mm-dd' ) {
29
21
return dateFormat ( new Date ( ) , format ) ;
You can’t perform that action at this time.
0 commit comments