MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / validate_manifest

Function validate_manifest

Tests/SdkIntegration/tactility.py:229–252  ·  view source on GitHub ↗
(manifest)

Source from the content-addressed store, hash-verified

227 return read_properties_file("manifest.properties")
228
229def validate_manifest(manifest):
230 # [manifest]
231 if not "manifest" in manifest:
232 exit_with_error("Invalid manifest format: [manifest] not found")
233 if not "version" in manifest["manifest"]:
234 exit_with_error("Invalid manifest format: [manifest] version not found")
235 # [target]
236 if not "target" in manifest:
237 exit_with_error("Invalid manifest format: [target] not found")
238 if not "sdk" in manifest["target"]:
239 exit_with_error("Invalid manifest format: [target] sdk not found")
240 if not "platforms" in manifest["target"]:
241 exit_with_error("Invalid manifest format: [target] platforms not found")
242 # [app]
243 if not "app" in manifest:
244 exit_with_error("Invalid manifest format: [app] not found")
245 if not "id" in manifest["app"]:
246 exit_with_error("Invalid manifest format: [app] id not found")
247 if not "versionName" in manifest["app"]:
248 exit_with_error("Invalid manifest format: [app] versionName not found")
249 if not "versionCode" in manifest["app"]:
250 exit_with_error("Invalid manifest format: [app] versionCode not found")
251 if not "name" in manifest["app"]:
252 exit_with_error("Invalid manifest format: [app] name not found")
253
254def is_valid_manifest_platform(manifest, platform):
255 manifest_platforms = manifest["target"]["platforms"].split(",")

Callers 1

tactility.pyFile · 0.85

Calls 1

exit_with_errorFunction · 0.70

Tested by

no test coverage detected