From 25562c127dbb722117f414f2062eb0d2584b2846 Mon Sep 17 00:00:00 2001 From: Nikos Douvlis Date: Tue, 7 Nov 2023 19:58:46 +0200 Subject: [PATCH] chore(repo): Fix snapshot releases when in prerelease mode --- .github/workflows/release-snapshot.yml | 5 +---- scripts/snapshot.mjs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index 28d44f1d39..9357d822f5 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -64,10 +64,7 @@ jobs: - name: Version packages for snapshot id: version-packages - run: | - # temporarily exit prerelease mode so snapshot works - changeset pre exit || true - npm run version:snapshot ${{ steps.extract-snapshot-name.outputs.name }} | tail -1 >> "$GITHUB_OUTPUT" + run: npm run version:snapshot ${{ steps.extract-snapshot-name.outputs.name }} | tail -1 >> "$GITHUB_OUTPUT" - name: Build release if: steps.version-packages.outputs.success == '1' diff --git a/scripts/snapshot.mjs b/scripts/snapshot.mjs index cc3b00a377..bad878e6f9 100755 --- a/scripts/snapshot.mjs +++ b/scripts/snapshot.mjs @@ -6,7 +6,7 @@ import { constants } from './common.mjs'; const prefix = argv.name || argv._[0] || 'snapshot'; await $`npx json -I -f ${constants.ChangesetConfigFile} -e "this.changelog = false"`; - +await $`npx changeset pre exit || true`; const res = await $`npx changeset version --snapshot ${prefix}`; const success = !res.stderr.includes('No unreleased changesets found');