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

Tools: Trying to fix Lerna publishing with automation token

This commit is contained in:
Laurent Cozic 2021-11-03 11:15:51 +00:00
parent 74fcd474af
commit cb26ab414d

View File

@ -2,26 +2,24 @@ const gulp = require('gulp');
const utils = require('./packages/tools/gulp/utils'); const utils = require('./packages/tools/gulp/utils');
const tasks = { const tasks = {
// copyLib: require('./packages/tools/gulp/tasks/copyLib'),
// tsc: require('./packages/tools/gulp/tasks/tsc'),
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'),
// deleteBuildDirs: require('./packages/tools/gulp/tasks/deleteBuildDirs'),
completePublishAll: { completePublishAll: {
fn: async () => { fn: async () => {
// await utils.execCommandVerbose('git pull');
await utils.execCommandVerbose('git', ['add', '-A']); await utils.execCommandVerbose('git', ['add', '-A']);
await utils.execCommandVerbose('git', ['commit', '-m', 'Releasing sub-packages']); await utils.execCommandVerbose('git', ['commit', '-m', 'Releasing sub-packages']);
await utils.execCommandVerbose('lerna', ['publish', 'from-package', '-y']);
// Lerna does some unnecessary auth check that doesn't work with
// automation tokens, thus the --no-verify-access. Automation token
// is still used for access when publishing even with this flag
// (publishing would fail otherwise).
// https://github.com/lerna/lerna/issues/2788
await utils.execCommandVerbose('lerna', ['publish', 'from-package', '-y', '--no-verify-access']);
await utils.execCommandVerbose('git', ['push']); await utils.execCommandVerbose('git', ['push']);
}, },
}, },
}; };
utils.registerGulpTasks(gulp, tasks); utils.registerGulpTasks(gulp, tasks);
// gulp.task('build', gulp.series('copyLib', 'tsc', 'updateIgnoredTypeScriptBuild'));
// // The clean task removes build directories and copy back the library. This is useful
// // when switching from one branch to another.
// gulp.task('clean', gulp.series('deleteBuildDirs', 'copyLib'));