Skip to content

Commit 7a5d2f5

Browse files
chore: add generated docs files to release commit (#3283)
1 parent 6cae4b4 commit 7a5d2f5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

etc/check-for-staged-changes.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! /bin/bash
2+
3+
## check for staged changes in any directory other than "docs"
4+
git diff-index --cached HEAD --exit-code | grep -v "docs" --silent
5+
6+
if [[ "$?" == 0 ]]; then
7+
echo "The release commit only allows staged files from the docs/ directory. Please unstage any other changes."
8+
exit 1
9+
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"fix:eslint": "npm run check:eslint -- --fix",
119119
"prepare": "node etc/prepare.js",
120120
"preview:docs": "ts-node etc/docs/preview.ts",
121-
"release": "standard-version -i HISTORY.md",
121+
"release": "standard-version -a -i HISTORY.md",
122122
"test": "npm run check:lint && npm run test:all",
123123
"test:all": "npm run check:unit && npm run check:test",
124124
"update:docs": "npm run build:docs -- --yes"

0 commit comments

Comments
 (0)