0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

ci: filter out ignore group when exec lifecycle scripts (#3018)

This commit is contained in:
Gao Sun 2023-01-29 14:48:35 +08:00 committed by GitHub
parent 69af8a381d
commit f17b69a513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,8 @@ const getIgnoreGroup = () => {
}); });
} }
const ignoreCmd = getIgnoreGroup() const ignoreGroup = getIgnoreGroup();
const ignoreCmd = ignoreGroup
.map(({ name }) => ` \\\n --ignore ${name}`) .map(({ name }) => ` \\\n --ignore ${name}`)
.join(''); .join('');
const cmd = ('pnpm changeset version' + ignoreCmd); const cmd = ('pnpm changeset version' + ignoreCmd);
@ -44,8 +45,11 @@ console.log(cmd);
await execAsync(cmd).catch(catchCmdError); await execAsync(cmd).catch(catchCmdError);
const filterCmd = ignoreGroup
.map(({ name }) => ` \\\n --filter \\!${name}`)
.join('');
// Manually run lifecycle script since changesets didn't // Manually run lifecycle script since changesets didn't
await execAsync('pnpm -r version').catch(catchCmdError); await execAsync(`pnpm -r ${filterCmd} version`).catch(catchCmdError);
// Sanity check for prepublish scripts // Sanity check for prepublish scripts
await execAsync('pnpm -r prepublishOnly').catch(catchCmdError); await execAsync(`pnpm -r ${filterCmd} prepublishOnly`).catch(catchCmdError);