Skip to content

Commit 8860218

Browse files
committed
fix: enhance branch check to allow publishing from release branches
1 parent 2e6c455 commit 8860218

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"test": "vitest run",
8181
"coverage": "vitest run --coverage",
8282
"check:state": "git diff --quiet && git diff --cached --quiet || { echo 'Git working directory is not clean. Please commit or stash changes before publishing.'; exit 1; }",
83-
"check:branch": "if [ $(git symbolic-ref --short HEAD) != 'master' ]; then echo 'You must be on the master branch to publish.'; exit 1; fi",
83+
"check:branch": "if [[ $(git symbolic-ref --short HEAD) != 'master' && ! $(git symbolic-ref --short HEAD) =~ ^release/ ]]; then echo 'You must be on the master branch or a release branch (release/...).'; exit 1; fi",
8484
"prepublishOnly": "npm run check:state && npm run check:branch && npm run build"
8585
},
8686
"engines": {

0 commit comments

Comments
 (0)