Skip to content

Commit 7cdb0a8

Browse files
committed
run yarn task from root
1 parent b1f7904 commit 7cdb0a8

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

scripts/release/__tests__/version.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jest.mock('../../../code/lib/cli/src/versions', () => ({
1212
}));
1313

1414
jest.mock('../../utils/exec');
15+
const { execaCommand } = require('../../utils/exec');
1516

1617
jest.mock('../../utils/workspace', () => ({
1718
getWorkspaces: jest.fn().mockResolvedValue([
@@ -224,6 +225,10 @@ describe('Version', () => {
224225
}),
225226
{ spaces: 2 }
226227
);
228+
expect(execaCommand).toHaveBeenCalledWith('yarn task --task=install', {
229+
cwd: path.join(CODE_DIR_PATH, '..'),
230+
stdio: undefined,
231+
});
227232
}
228233
);
229234
});

scripts/release/version.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,13 @@ export const run = async (options: unknown) => {
237237
await bumpCodeVersion(nextVersion);
238238
await bumpVersionSources(currentVersion, nextVersion);
239239
await bumpAllPackageJsons({ packages, currentVersion, nextVersion, verbose });
240-
// update lock file
241-
await execaCommand(`yarn task --task install`, {
242-
cwd: CODE_DIR_PATH,
240+
241+
console.log(`⬆️ Updating lock file with ${chalk.blue('yarn install')}`);
242+
await execaCommand(`yarn task --task=install`, {
243+
cwd: path.join(__dirname, '..', '..'),
243244
stdio: verbose ? 'inherit' : undefined,
244245
});
246+
console.log(`✅ Updated lock file with ${chalk.blue('yarn install')}`);
245247

246248
if (process.env.GITHUB_ACTIONS === 'true') {
247249
setOutput('current-version', currentVersion);

0 commit comments

Comments
 (0)