Skip to content

Commit 64590a2

Browse files
committed
Fix prerelease tags
1 parent b97afaa commit 64590a2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"format:check": "prettier --ignore-path .eslintignore --check .",
99
"lint": "eslint --cache .",
1010
"prerelease": "pnpm build",
11-
"release": "changeset publish --tag v6",
11+
"release": "./scripts/changesets-release.sh",
1212
"size": "filesize",
1313
"test": "jest",
1414
"test:inspect": "node --inspect-brk ./node_modules/.bin/jest",

scripts/changesets-release.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
MODE=$(node -e "console.log(require('./.changeset/pre.json').mode)")
4+
5+
# Can only provide a custom --tag when not in prerelease mode
6+
# The prerelease tags come from the pre.json "tag" field
7+
if [ $MODE == "exit" ]; then
8+
pnpm exec changeset publish --tag v6
9+
else
10+
pnpm exec changeset publish
11+
fi

0 commit comments

Comments
 (0)