Skip to content

Commit 54cc73f

Browse files
committed
Use tmp to compare the build files before and after build
1 parent a7cf8e1 commit 54cc73f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.circleci/config.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ jobs:
172172

173173
steps:
174174
- checkout
175+
- run:
176+
name: Copy current files to a temporary directory
177+
command: |
178+
cp -R plotly/labextension/ plotly/labextension-tmp/
175179
- run:
176180
name: Install dependencies
177181
command: |
@@ -186,7 +190,15 @@ jobs:
186190
name: Check JupyterLab build artifacts
187191
command: |
188192
echo "Checking for uncommitted changes in plotly/labextension/..."
189-
git diff --exit-code plotly/labextension/ || (echo "Error: JupyterLab build artifacts out of date. Run 'npm run build' in js/ and commit the results." && exit 1)
193+
git diff --exit-code plotly/labextension-tmp/ plotly/labextension/
194+
if [ $? -ne 0 ]; then
195+
echo "Uncommitted changes found in plotly/labextension/"
196+
echo "Please run 'git diff' to see the changes."
197+
echo "If you are sure you want to commit these changes, run 'git add plotly/labextension/' and 'git commit -m \"Update labextension\"'."
198+
exit 1
199+
else
200+
echo "No uncommitted changes found in plotly/labextension/"
201+
fi
190202
191203
# Percy
192204
python_311_percy:

0 commit comments

Comments
 (0)