Skip to content

Commit

Permalink
chore(repo): Fix snapshot releases when in prerelease mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosdouvlis committed Nov 7, 2023
1 parent 68dabd4 commit 25562c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion scripts/snapshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 25562c1

Please sign in to comment.