mirror of
https://github.com/godotengine/godot-blender-exporter.git
synced 2025-12-31 17:49:19 +03:00
Fix make update-examples.
The existing script had some limitations: - It expected a certain level of nesting, and failed for tests/test_scenes/material_cycle/material_spatial/ due to the extra level of nesting - It only copied `.escn` files, but we actually need to make sure other files (like `.png` textures) are produced - It would not clean up files left behind from prior runs. For example, if an update failed to produce a `.png`, but we had it left from the prior run, we wouldn't notice. The `rm`/`cp` approach is simpler and solves these problems.
This commit is contained in:
8
Makefile
8
Makefile
@@ -25,12 +25,8 @@ test-import: export-blends
|
||||
|
||||
|
||||
update-examples:
|
||||
mkdir -p tests/reference_exports
|
||||
find tests/godot_project/exports/ -name *.escn | while read f; \
|
||||
do \
|
||||
mkdir -p "tests/reference_exports/$$(echo $$f | cut -d/ -f4)"; \
|
||||
cp "$$f" "tests/reference_exports/$$(echo $$f | cut -d/ -f4-)"; \
|
||||
done;
|
||||
rm -r tests/reference_exports/*
|
||||
cp -r tests/godot_project/exports/* tests/reference_exports/
|
||||
|
||||
compare: export-blends
|
||||
diff -x "*.escn.import" -rq tests/godot_project/exports/ tests/reference_exports/
|
||||
|
||||
Reference in New Issue
Block a user