mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
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);
|
|
});
|