From 7fb689b7346ebfd3fd74e8fe2d86ba5c736cb146 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Fri, 6 Jan 2023 16:33:08 +0800 Subject: [PATCH] fix: version lifecycle script (#2832) --- .changeset/slow-meals-enjoy.md | 7 +++++++ .scripts/version.js | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .changeset/slow-meals-enjoy.md diff --git a/.changeset/slow-meals-enjoy.md b/.changeset/slow-meals-enjoy.md new file mode 100644 index 000000000..40a2f8a22 --- /dev/null +++ b/.changeset/slow-meals-enjoy.md @@ -0,0 +1,7 @@ +--- +"@logto/cli": patch +"@logto/create": patch +"@logto/schemas": patch +--- + +Fix version lifecycle script diff --git a/.scripts/version.js b/.scripts/version.js index 6a22b0418..0ab170533 100644 --- a/.scripts/version.js +++ b/.scripts/version.js @@ -33,9 +33,14 @@ const ignoreCmd = getIgnoreGroup() .join(''); const cmd = ('pnpm changeset version' + ignoreCmd); -console.log(cmd); - -await execAsync(cmd).catch(({ stderr, code }) => { +const catchCmdError = ({ stderr, code }) => { console.error(stderr); process.exit(code ?? 1); -}); +}; + +console.log(cmd); + +await execAsync(cmd).catch(catchCmdError); + +// Manually run lifecycle script since changesets didn't +await execAsync('pnpm -r version').catch(catchCmdError);