File tree 3 files changed +22
-2
lines changed
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"prepare" : " yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-serial-plotter && yarn clean && yarn download-examples && yarn build && yarn test" ,
8
8
"clean" : " rimraf lib" ,
9
+ "compose-changelog" : " node ./scripts/compose-changelog.js" ,
9
10
"download-cli" : " node ./scripts/download-cli.js" ,
10
11
"download-fwuploader" : " node ./scripts/download-fwuploader.js" ,
11
12
"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 1
1
// @ts -check
2
2
3
+
3
4
( async ( ) => {
4
5
const { Octokit } = require ( '@octokit/rest' ) ;
6
+ const fs = require ( "fs" ) ;
7
+ const path = require ( "path" ) ;
5
8
6
9
const octokit = new Octokit ( {
7
10
userAgent : 'Arduino IDE compose-changelog.js' ,
24
27
return acc + `# ${ item . name } \n\n${ body } \n\n---\n\n` ;
25
28
} , '' ) ;
26
29
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
+ )
28
46
} ) ( ) ;
29
47
30
48
Original file line number Diff line number Diff line change 46
46
"i18n:generate" : " theia nls-extract -e vscode -f \" +(arduino-ide-extension|browser-app|electron|electron-app|plugins)/**/*.ts?(x)\" -o ./i18n/en.json" ,
47
47
"i18n:check" : " yarn i18n:generate && git add -N ./i18n && git diff --exit-code ./i18n" ,
48
48
"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"
50
51
},
51
52
"lint-staged" : {
52
53
"./arduino-ide-extension/**/*.{ts,tsx}" : [
You can’t perform that action at this time.
0 commit comments