mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-24 04:56:32 +00:00
Changelog file is now written to file
This commit is contained in:
parent
e8477b14f3
commit
dcebd863cc
@ -6,6 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-serial-plotter && yarn clean && yarn download-examples && yarn build && yarn test",
|
"prepare": "yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-serial-plotter && yarn clean && yarn download-examples && yarn build && yarn test",
|
||||||
"clean": "rimraf lib",
|
"clean": "rimraf lib",
|
||||||
|
"compose-changelog": "node ./scripts/compose-changelog.js",
|
||||||
"download-cli": "node ./scripts/download-cli.js",
|
"download-cli": "node ./scripts/download-cli.js",
|
||||||
"download-fwuploader": "node ./scripts/download-fwuploader.js",
|
"download-fwuploader": "node ./scripts/download-fwuploader.js",
|
||||||
"copy-serial-plotter": "npx ncp ../node_modules/arduino-serial-plotter-webapp ./build/arduino-serial-plotter-webapp",
|
"copy-serial-plotter": "npx ncp ../node_modules/arduino-serial-plotter-webapp ./build/arduino-serial-plotter-webapp",
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
const octokit = new Octokit({
|
const octokit = new Octokit({
|
||||||
userAgent: 'Arduino IDE compose-changelog.js',
|
userAgent: 'Arduino IDE compose-changelog.js',
|
||||||
@ -24,7 +27,22 @@
|
|||||||
return acc + `# ${item.name}\n\n${body}\n\n---\n\n`;
|
return acc + `# ${item.name}\n\n${body}\n\n---\n\n`;
|
||||||
}, '');
|
}, '');
|
||||||
|
|
||||||
console.log(fullChangelog);
|
const changelogFile = path.resolve(process.argv[process.argv.length - 1]);
|
||||||
|
|
||||||
|
await fs.writeFile(
|
||||||
|
changelogFile,
|
||||||
|
fullChangelog,
|
||||||
|
{
|
||||||
|
flag: "w+",
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
if (err) {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
console.log("Changelog written to", changelogFile);
|
||||||
|
}
|
||||||
|
)
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
"i18n:generate": "theia nls-extract -e vscode -f \"+(arduino-ide-extension|browser-app|electron|electron-app|plugins)/**/*.ts?(x)\" -o ./i18n/en.json",
|
"i18n:generate": "theia nls-extract -e vscode -f \"+(arduino-ide-extension|browser-app|electron|electron-app|plugins)/**/*.ts?(x)\" -o ./i18n/en.json",
|
||||||
"i18n:check": "yarn i18n:generate && git add -N ./i18n && git diff --exit-code ./i18n",
|
"i18n:check": "yarn i18n:generate && git add -N ./i18n && git diff --exit-code ./i18n",
|
||||||
"i18n:push": "node ./scripts/i18n/transifex-push.js ./i18n/en.json",
|
"i18n:push": "node ./scripts/i18n/transifex-push.js ./i18n/en.json",
|
||||||
"i18n:pull": "node ./scripts/i18n/transifex-pull.js ./i18n/"
|
"i18n:pull": "node ./scripts/i18n/transifex-pull.js ./i18n/",
|
||||||
|
"compose-changelog": "yarn --cwd ./arduino-ide-extension compose-changelog"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"./arduino-ide-extension/**/*.{ts,tsx}": [
|
"./arduino-ide-extension/**/*.{ts,tsx}": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user