Skip to content

Commit 89a2b45

Browse files
committed
Closes #98, automatically accept chromatic changes on master (#99)
Chromatic accept (#100) * automatically accept chromatic changes on master * add chromatic:ci script to package.json
1 parent 9265e54 commit 89a2b45

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.codeclimate.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ checks:
55
threshold: 90
66
exclude_patterns:
77
- "docs/"
8+
- "scripts/"
89
- "examples/"
910
- "src/__mocks__"
1011
- "dist/"

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"prebuild:storybook": "npm run test:generate-output",
1717
"storybook": "cross-env NODE_ENV=development start-storybook -p 6006",
1818
"docs": "build-storybook -c .storybook -o docs",
19+
"chromatic:ci": "chromatic test --auto-accept-changes",
1920
"chromatic": "chromatic test"
2021
},
2122
"repository": {

scripts/chromatic-build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if [ "$CI_BRANCH" != "master" ];
2+
then
3+
npm run chromatic
4+
else
5+
# We know any changes that make it to master *must* have been approved
6+
npm run chromatic:ci
7+
fi

0 commit comments

Comments
 (0)