Răsfoiți Sursa

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.
Ryan Roden-Corrent 4 ani în urmă
părinte
comite
0a662248ad
1 a modificat fișierele cu 2 adăugiri și 6 ștergeri
  1. 2 6
      Makefile

+ 2 - 6
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/