-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
updateMarkdownDoc.ts
34 lines (29 loc) · 1.22 KB
/
updateMarkdownDoc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { execCommand } from '@joplin/utils';
import { chdir } from 'process';
import { rootDir, gitRepoCleanTry } from './tool-utils';
import updateDownloadPage from './website/updateDownloadPage';
async function main() {
const doGitOperations = false;
if (doGitOperations) {
await gitRepoCleanTry();
await execCommand(['git', 'pull', '--rebase']);
}
await execCommand(['node', `${rootDir}/packages/tools/update-readme-download.js`]);
await execCommand(['node', `${rootDir}/packages/tools/build-release-stats.js`, '--types=changelog']);
await execCommand(['node', `${rootDir}/packages/tools/build-release-stats.js`, '--types=stats', '--update-interval=30']);
await execCommand(['node', `${rootDir}/packages/tools/update-readme-sponsors.js`]);
await execCommand(['node', `${rootDir}/packages/tools/build-welcome.js`]);
chdir(rootDir);
await execCommand(['yarn', 'run', 'buildApiDoc']);
await updateDownloadPage();
if (doGitOperations) {
await execCommand(['git', 'add', '-A']);
await execCommand(['git', 'commit', '-m', 'Update Markdown doc']);
await execCommand(['git', 'pull', '--rebase']);
await execCommand(['git', 'push']);
}
}
main().catch((error) => {
console.error('Fatal error', error);
process.exit(1);
});