Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a56c55a

Browse files
committed
update diff method
1 parent ab922bf commit a56c55a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.circleci/config.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,23 @@ jobs:
193193
- run:
194194
name: Check JupyterLab build artifacts
195195
command: |
196-
# Compare all files except 'Only in' cases
196+
# 1. Compare all files except 'Only in' cases
197197
diff -qr plotly/labextension-tmp/ plotly/labextension/ | grep -v '^Only in' > build_diff.txt || true
198-
199198
cat build_diff.txt
200199
201-
# Filter out package.json from the global diff (we’ll check it separately)
200+
# 2. Filter out package.json from overall diff
202201
grep -v 'package.json' build_diff.txt > filtered_diff.txt
203-
204202
cat filtered_diff.txt
205203
206-
# Check if package.json differs
207-
diff plotly/labextension/package.json plotly/labextension-tmp/package.json > package_json_diff.txt || true
208-
204+
# 3. Diff package.json in unified mode
205+
diff -u plotly/labextension/package.json plotly/labextension-tmp/package.json > package_json_diff.txt || true
209206
cat package_json_diff.txt
210207
211-
# Allow only the "load": "static/..." line to differ
208+
# 4. Filter out the line that changes ("load": "static/...js")
212209
grep -vE '"load": "static/.*\.js"' package_json_diff.txt > package_json_diff_filtered.txt
213-
214210
cat package_json_diff_filtered.txt
215211
216-
# Check both filtered diffs
212+
# 5. Final check
217213
if [ -s filtered_diff.txt ] || [ -s package_json_diff_filtered.txt ]; then
218214
echo "❌ Build artifacts differ:"
219215
echo "--- Unexpected diffs ---"
@@ -222,10 +218,11 @@ jobs:
222218
cat package_json_diff_filtered.txt
223219
exit 1
224220
else
225-
echo "✅ Build artifacts match expected output (ignoring allowed hash in package.json)."
221+
echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)."
226222
fi
227223
228224
225+
229226
# Percy
230227
python_311_percy:
231228
docker:

0 commit comments

Comments
 (0)