mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
Tools: Build package sequentially on CI to try to prevent various file access errors
This commit is contained in:
parent
3cf0841775
commit
5d4ebc6e14
16
gulpfile.js
16
gulpfile.js
@ -20,6 +20,22 @@ const tasks = {
|
|||||||
await utils.execCommandVerbose('git', ['push']);
|
await utils.execCommandVerbose('git', ['push']);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
build: {
|
||||||
|
fn: async () => {
|
||||||
|
// Building everything in parallel seems to be unreliable on CI as
|
||||||
|
// certain scripts randomly fail with missing files or folder, or
|
||||||
|
// cannot delete certain directories (eg. copyPluginAssets or
|
||||||
|
// copyApplicationAssets). Because of this, on CI, we run the build
|
||||||
|
// sequencially. Locally we run it in parallel, which is much
|
||||||
|
// faster, especially when having to rebuild after adding a
|
||||||
|
// dependency.
|
||||||
|
if (process.env.IS_CONTINUOUS_INTEGRATION === '1') {
|
||||||
|
await utils.execCommandVerbose('yarn', ['run', 'buildSequential']);
|
||||||
|
} else {
|
||||||
|
await utils.execCommandVerbose('yarn', ['run', 'buildParallel']);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.registerGulpTasks(gulp, tasks);
|
utils.registerGulpTasks(gulp, tasks);
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
"node": ">=16"
|
"node": ">=16"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn workspaces foreach --verbose --interlaced --parallel run build && yarn run tsc",
|
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 run build && yarn run tsc",
|
||||||
|
"buildSequential": "yarn workspaces foreach --verbose --interlaced run build && yarn run tsc",
|
||||||
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
||||||
"buildCommandIndex": "gulp buildCommandIndex",
|
"buildCommandIndex": "gulp buildCommandIndex",
|
||||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||||
@ -28,9 +29,9 @@
|
|||||||
"linter-ci": "eslint --resolve-plugins-relative-to . --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
"linter-ci": "eslint --resolve-plugins-relative-to . --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||||
"linter-precommit": "eslint --resolve-plugins-relative-to . --fix --ext .js --ext .jsx --ext .ts --ext .tsx",
|
"linter-precommit": "eslint --resolve-plugins-relative-to . --fix --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||||
"linter": "eslint --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
"linter": "eslint --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||||
"postinstall": "yarn run build",
|
"postinstall": "gulp build",
|
||||||
"publishAll": "git pull && yarn run build && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
"publishAll": "git pull && yarn run buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||||
"releaseAndroid": "yarn run build && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
"releaseAndroid": "yarn run buildParallel && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
||||||
"releaseAndroidClean": "node packages/tools/release-android.js",
|
"releaseAndroidClean": "node packages/tools/release-android.js",
|
||||||
"releaseCli": "node packages/tools/release-cli.js",
|
"releaseCli": "node packages/tools/release-cli.js",
|
||||||
"releaseClipper": "node packages/tools/release-clipper.js",
|
"releaseClipper": "node packages/tools/release-clipper.js",
|
||||||
|
@ -19,6 +19,7 @@ utils.execCommandVerbose = function(commandName, args = []) {
|
|||||||
console.info(`> ${commandName}`, args && args.length ? args : '');
|
console.info(`> ${commandName}`, args && args.length ? args : '');
|
||||||
const promise = execa(commandName, args);
|
const promise = execa(commandName, args);
|
||||||
promise.stdout.pipe(process.stdout);
|
promise.stdout.pipe(process.stdout);
|
||||||
|
promise.stderr.pipe(process.stderr);
|
||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user