[FL-2481] Renamed assets->resources; enforcing Manifest build if it does not exist (#1135)

* Renamed assets->resources; enforcing Manifest build if it does not exist
* Rebuild resources from CI
* Added Manifest to repo - be sure to rebuild it with `make -C assets` before committing changes!
* Actually added Manifest.
* Keeping Manifest on assets clean
* Spelling fix in Makefile
This commit is contained in:
hedger
2022-04-19 22:02:37 +03:00
committed by GitHub
parent 956788c09b
commit 57312961e8
17 changed files with 343 additions and 68 deletions

View File

@@ -203,15 +203,12 @@ class Main(App):
manifest_file = os.path.join(directory_path, "Manifest")
old_manifest = Manifest()
if os.path.exists(manifest_file):
self.logger.info(
f"old manifest is present, loading for compare and removing file"
)
self.logger.info("old manifest is present, loading for compare")
old_manifest.load(manifest_file)
os.unlink(manifest_file)
self.logger.info(f'Creating new Manifest for directory "{directory_path}"')
new_manifest = Manifest()
new_manifest.create(directory_path)
new_manifest.save(manifest_file)
self.logger.info(f"Comparing new manifest with old")
only_in_old, changed, only_in_new = Manifest.compare(old_manifest, new_manifest)
for record in only_in_old:
@@ -220,6 +217,12 @@ class Main(App):
self.logger.info(f"Changed: {record}")
for record in only_in_new:
self.logger.info(f"Only in new: {record}")
if any((only_in_old, changed, only_in_new)):
self.logger.warning("Manifests are different, updating")
new_manifest.save(manifest_file)
else:
self.logger.info("Manifest is up-to-date!")
self.logger.info(f"Complete")
return 0