1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Tools: Removing packages/tools dependency from root workspace

This commit is contained in:
Laurent Cozic 2023-04-06 11:02:22 +02:00
parent bc6c5ab7a7
commit 93fa92369b
3 changed files with 15 additions and 11 deletions

View File

@ -1,26 +1,26 @@
const gulp = require('gulp'); const gulp = require('gulp');
const utils = require('./packages/tools/gulp/utils'); const { execCommand } = require('@joplin/utils');
const tasks = { const tasks = {
updateIgnoredTypeScriptBuild: require('./packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild'), updateIgnoredTypeScriptBuild: require('./packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
buildCommandIndex: require('./packages/tools/gulp/tasks/buildCommandIndex'), buildCommandIndex: require('./packages/tools/gulp/tasks/buildCommandIndex'),
completePublishAll: { completePublishAll: {
fn: async () => { fn: async () => {
await utils.execCommandVerbose('git', ['add', '-A']); await execCommand(['git', 'add', '-A']);
await utils.execCommandVerbose('git', ['commit', '-m', 'Releasing sub-packages']); await execCommand(['git', 'commit', '-m', 'Releasing sub-packages']);
// Lerna does some unnecessary auth check that doesn't work with // Lerna does some unnecessary auth check that doesn't work with
// automation tokens, thus the --no-verify-access. Automation token // automation tokens, thus the --no-verify-access. Automation token
// is still used for access when publishing even with this flag // is still used for access when publishing even with this flag
// (publishing would fail otherwise). // (publishing would fail otherwise).
// https://github.com/lerna/lerna/issues/2788 // https://github.com/lerna/lerna/issues/2788
await utils.execCommandVerbose('lerna', ['publish', 'from-package', '-y', '--no-verify-access']); await execCommand(['lerna', 'publish', 'from-package', '-y', '--no-verify-access']);
await utils.execCommandVerbose('yarn', ['install']); await execCommand(['yarn', 'install']);
await utils.execCommandVerbose('git', ['add', '-A']); await execCommand(['git', 'add', '-A']);
await utils.execCommandVerbose('git', ['commit', '-m', 'Lock file']); await execCommand(['git', 'commit', '-m', 'Lock file']);
await utils.execCommandVerbose('git', ['push']); await execCommand(['git', 'push']);
}, },
}, },
build: { build: {
@ -33,12 +33,14 @@ const tasks = {
// faster, especially when having to rebuild after adding a // faster, especially when having to rebuild after adding a
// dependency. // dependency.
if (process.env.BUILD_SEQUENCIAL === '1') { if (process.env.BUILD_SEQUENCIAL === '1') {
await utils.execCommandVerbose('yarn', ['run', 'buildSequential']); await execCommand(['yarn', 'run', 'buildSequential']);
} else { } else {
await utils.execCommandVerbose('yarn', ['run', 'buildParallel']); await execCommand(['yarn', 'run', 'buildParallel']);
} }
}, },
}, },
}; };
utils.registerGulpTasks(gulp, tasks); for (const taskName in tasks) {
gulp.task(taskName, tasks[taskName].fn);
}

View File

@ -64,6 +64,7 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@joplin/utils": "~2.11",
"@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0", "@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0",
"@typescript-eslint/eslint-plugin": "5.48.2", "@typescript-eslint/eslint-plugin": "5.48.2",
"@typescript-eslint/parser": "5.48.2", "@typescript-eslint/parser": "5.48.2",

View File

@ -28898,6 +28898,7 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "root@workspace:." resolution: "root@workspace:."
dependencies: dependencies:
"@joplin/utils": ~2.11
"@seiyab/eslint-plugin-react-hooks": 4.5.1-beta.0 "@seiyab/eslint-plugin-react-hooks": 4.5.1-beta.0
"@types/fs-extra": 9.0.13 "@types/fs-extra": 9.0.13
"@typescript-eslint/eslint-plugin": 5.48.2 "@typescript-eslint/eslint-plugin": 5.48.2