@@ -19,7 +19,7 @@ if (status.stdout.length !== 0) {
19
19
Deno . exit ( 1 ) ;
20
20
}
21
21
22
- info ( "Running tests" ) ;
22
+ info ( "> Running tests" ) ;
23
23
24
24
if (
25
25
! new Deno . Command ( "deno" , {
32
32
Deno . exit ( 1 ) ;
33
33
}
34
34
35
+ info ( "Tests passed" ) ;
36
+ info ( "> Type-checking" ) ;
37
+ if (
38
+ ! new Deno . Command ( "deno" , {
39
+ args : [ "check" , "**/*.ts" ] ,
40
+ stdout : "inherit" ,
41
+ "stderr" : "inherit" ,
42
+ } ) . outputSync ( ) . success
43
+ ) {
44
+ critical ( "Type-checking failed" ) ;
45
+ Deno . exit ( 1 ) ;
46
+ }
47
+ info ( "Type-checking passed" ) ;
48
+ info ( "> Linting" ) ;
49
+ if (
50
+ ! new Deno . Command ( "deno" , {
51
+ args : [ "lint" ] ,
52
+ stdout : "inherit" ,
53
+ "stderr" : "inherit" ,
54
+ } ) . outputSync ( ) . success
55
+ ) {
56
+ critical ( "Linting failed" ) ;
57
+ Deno . exit ( 1 ) ;
58
+ }
59
+ info ( "Linting passed" ) ;
60
+ info ( "> Linting Documentation" ) ;
61
+ if (
62
+ ! new Deno . Command ( "deno" , {
63
+ args : [ "doc" , "--lint" , "**/*.ts" ] ,
64
+ stdout : "inherit" ,
65
+ "stderr" : "inherit" ,
66
+ } ) . outputSync ( ) . success
67
+ ) {
68
+ critical ( "Linting Documentation failed" ) ;
69
+ Deno . exit ( 1 ) ;
70
+ }
71
+
35
72
const CURRENT_FILE = import . meta. url . replace ( "file://" , "" ) ;
36
73
Deno . chdir ( resolve ( CURRENT_FILE , ".." , ".." ) ) ;
37
74
@@ -52,7 +89,7 @@ const newVersion = format(increment(parse(currentVersion), bump.releaseType));
52
89
53
90
info ( `Bumping version from ${ currentVersion } to ${ newVersion } ` ) ;
54
91
55
- info ( "Updating deno.json" ) ;
92
+ info ( "> Updating deno.json" ) ;
56
93
57
94
Deno . writeTextFile (
58
95
"./deno.json" ,
@@ -67,7 +104,7 @@ Deno.writeTextFile(
67
104
) ;
68
105
69
106
info ( "Updated deno.json" ) ;
70
- info ( "Generating changelog" ) ;
107
+ info ( "> Generating changelog" ) ;
71
108
72
109
const changelog = await new Promise < string > ( ( resolve , reject ) => {
73
110
let data = "#" ;
@@ -93,6 +130,7 @@ const newChangelog = oldChangelog.replace(
93
130
Deno . writeTextFile ( "./CHANGELOG.md" , newChangelog ) ;
94
131
95
132
info ( "Updated CHANGELOG.md" ) ;
133
+ info ( "> Adding files to git" ) ;
96
134
if (
97
135
! new Deno . Command ( "git" , {
98
136
args : [ "add" , "deno.json" , "CHANGELOG.md" ] ,
106
144
107
145
info ( "Added files to git" ) ;
108
146
147
+ info ( "> Committing changes" ) ;
109
148
if (
110
149
! new Deno . Command ( "git" , {
111
150
args : [ "commit" , "-m" , `chore(release): Release v${ newVersion } 🚀` ] ,
@@ -118,10 +157,17 @@ if (
118
157
}
119
158
120
159
info ( "Committed changes" ) ;
160
+ info ( "> Tagging release" ) ;
121
161
122
162
if (
123
163
! new Deno . Command ( "git" , {
124
- args : [ "tag" , `v${ newVersion } ` ] ,
164
+ args : [
165
+ "tag" ,
166
+ "-a" ,
167
+ `v${ newVersion } ` ,
168
+ "-m" ,
169
+ changelog . split ( "\n" ) . slice ( 1 ) . join ( "\n" ) ,
170
+ ] ,
125
171
stdout : "inherit" ,
126
172
"stderr" : "inherit" ,
127
173
} ) . outputSync ( ) . success
131
177
}
132
178
133
179
info ( "Tagged release" ) ;
180
+ info ( "Release complete 🚀" ) ;
181
+ info ( "Run `git push --follow-tags` to push changes to the remote repository" ) ;
0 commit comments