File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 66 "scripts" : {
77 "prepare" : " yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-serial-plotter && yarn clean && yarn download-examples && yarn build && yarn test" ,
88 "clean" : " rimraf lib" ,
9+ "compose-changelog" : " node ./scripts/compose-changelog.js" ,
910 "download-cli" : " node ./scripts/download-cli.js" ,
1011 "download-fwuploader" : " node ./scripts/download-fwuploader.js" ,
1112 "copy-serial-plotter" : " npx ncp ../node_modules/arduino-serial-plotter-webapp ./build/arduino-serial-plotter-webapp" ,
Original file line number Diff line number Diff line change 11// @ts -check
22
3+
34( async ( ) => {
45 const { Octokit } = require ( '@octokit/rest' ) ;
6+ const fs = require ( "fs" ) ;
7+ const path = require ( "path" ) ;
58
69 const octokit = new Octokit ( {
710 userAgent : 'Arduino IDE compose-changelog.js' ,
2427 return acc + `# ${ item . name } \n\n${ body } \n\n---\n\n` ;
2528 } , '' ) ;
2629
27- console . log ( fullChangelog ) ;
30+ const changelogFile = path . resolve ( process . argv [ process . argv . length - 1 ] ) ;
31+
32+ await fs . writeFile (
33+ changelogFile ,
34+ fullChangelog ,
35+ {
36+ flag : "w+" ,
37+ } ,
38+ err => {
39+ if ( err ) {
40+ console . error ( err ) ;
41+ process . exit ( 1 ) ;
42+ }
43+ console . log ( "Changelog written to" , changelogFile ) ;
44+ }
45+ )
2846} ) ( ) ;
2947
3048
Original file line number Diff line number Diff line change 4646 "i18n:generate" : " theia nls-extract -e vscode -f \" +(arduino-ide-extension|browser-app|electron|electron-app|plugins)/**/*.ts?(x)\" -o ./i18n/en.json" ,
4747 "i18n:check" : " yarn i18n:generate && git add -N ./i18n && git diff --exit-code ./i18n" ,
4848 "i18n:push" : " node ./scripts/i18n/transifex-push.js ./i18n/en.json" ,
49- "i18n:pull" : " node ./scripts/i18n/transifex-pull.js ./i18n/"
49+ "i18n:pull" : " node ./scripts/i18n/transifex-pull.js ./i18n/" ,
50+ "compose-changelog" : " yarn --cwd ./arduino-ide-extension compose-changelog"
5051 },
5152 "lint-staged" : {
5253 "./arduino-ide-extension/**/*.{ts,tsx}" : [
You can’t perform that action at this time.
0 commit comments