File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ for (let track of tracks) {
3535 track = track . replace ( "noble-intel" , "linux" ) ;
3636 }
3737
38- const path = `./src/content/warp-releases/${ track } /${ item . version } .yaml` ;
38+ const folder = `./src/content/warp-releases/${ track } ` ;
39+ const path = `${ folder } /${ item . version } .yaml` ;
40+
41+ if ( ! fs . existsSync ( folder ) ) {
42+ fs . mkdirSync ( folder , { recursive : true } ) ;
43+ }
3944
4045 if ( fs . existsSync ( path ) ) {
4146 console . log ( `${ track } ${ item . version } already exists.` ) ;
@@ -66,13 +71,16 @@ for (let track of tracks) {
6671 } ) ;
6772
6873 const releaseNotes = tokens . reduce ( ( s , t ) => s + t . raw , "" ) ;
74+ const platformName = data . platformName . startsWith ( "noble-" )
75+ ? "Linux"
76+ : data . platformName ;
6977
7078 fs . writeFileSync (
7179 `./src/content/warp-releases/${ track } /${ item . version } .yaml` ,
7280 YAML . stringify ( {
7381 ...item ,
7482 releaseNotes,
75- platformName : data . platformName ,
83+ platformName,
7684 } ) ,
7785 "utf-8" ,
7886 ) ;
You can’t perform that action at this time.
0 commit comments