ExtensionSystem: introduce versioning

Require that all extensions have a "shell-version" property in their
metadata, which is an array of supported Shell versions.
Extensions can target a specific version triple or an entire stable
version.
Optionally, they can also require a specific GJS version, to ensure
compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=639255
This commit is contained in:
Giovanni Campagna
2011-01-11 22:42:34 +01:00
parent 6200daa5bb
commit 5412ce276c
2 changed files with 42 additions and 3 deletions

View File

@ -672,7 +672,8 @@ use an extension title clicktofocus@janedoe.example.com.'''
os.makedirs(extension_path)
meta = { 'name': name,
'description': description,
'uuid': uuid }
'uuid': uuid,
'shell-version': ['@VERSION@'] }
f = open(os.path.join(extension_path, 'metadata.json'), 'w')
try:
json.dump(meta, f)