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:
Ryan Roden-Corrent
2020-12-15 15:58:47 -05:00
parent cffee6be46
commit 0a662248ad

View File

@@ -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/