File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ component{
70
70
docs ( argumentCollection = arguments );
71
71
72
72
// checksums
73
- buildChecksums ();
73
+ buildChecksums ();
74
+
75
+ // Build latest changelog
76
+ latestChangelog ();
74
77
75
78
// Finalize Message
76
79
print .line ()
@@ -195,7 +198,28 @@ component{
195
198
overwrite = true ,
196
199
recurse = true
197
200
);
198
- }
201
+ }
202
+
203
+ /**
204
+ * Build the latest changelog file: changelog-latest.md
205
+ */
206
+ function latestChangelog (){
207
+ print .blueLine ( " Building latest changelog..." ).toConsole ();
208
+
209
+ if ( ! fileExists ( variables .cwd & " changelog.md" ) ){
210
+ return error ( " Cannot continue building, changelog.md file doesn't exist!" );
211
+ }
212
+
213
+ fileWrite (
214
+ variables .cwd & " changelog-latest.md" ,
215
+ fileRead ( variables .cwd & ' changelog.md' ).split ( ' ----' )[2 ].trim () & chr ( 13 ) & chr ( 10 )
216
+ );
217
+
218
+ print
219
+ .greenLine ( " Latest changelog file created at `changelog-latest.md`" )
220
+ .line ()
221
+ .line ( fileRead ( variables .cwd & " changelog-latest.md" ) );
222
+ }
199
223
200
224
/* ******************************************** PRIVATE HELPERS *********************************************/
201
225
You can’t perform that action at this time.
0 commit comments