Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #336 from whimboo/contributors
Browse files Browse the repository at this point in the history
Bug 721657 - Write out list of contributors to install.rdf as specified in package.json r=@ochameau
  • Loading branch information
ochameau committed Feb 7, 2012
2 parents 215e619 + f48fa5a commit a4f58b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python-lib/cuddlefish/rdf.py
Expand Up @@ -116,6 +116,7 @@ def gen_manifest(template_root_dir, target_cfg, jid,
update_url=None, bootstrap=True, enable_mobile=False):
install_rdf = os.path.join(template_root_dir, "install.rdf")
manifest = RDFManifest(install_rdf)
dom = manifest.dom

manifest.set("em:id", jid)
manifest.set("em:version",
Expand All @@ -132,6 +133,11 @@ def gen_manifest(template_root_dir, target_cfg, jid,
# booleans in the .json file, not strings.
manifest.set("em:unpack", "true" if target_cfg.get("unpack") else "false")

for contributor in target_cfg.get("contributors", [ ]):
elem = dom.createElement("em:contributor");
elem.appendChild(dom.createTextNode(contributor))
dom.documentElement.getElementsByTagName("Description")[0].appendChild(elem)

if update_url:
manifest.set("em:updateURL", update_url)
else:
Expand All @@ -143,7 +149,6 @@ def gen_manifest(template_root_dir, target_cfg, jid,
manifest.remove("em:optionsType")

if enable_mobile:
dom = manifest.dom
target_app = dom.createElement("em:targetApplication")
dom.documentElement.getElementsByTagName("Description")[0].appendChild(target_app)

Expand Down

0 comments on commit a4f58b3

Please sign in to comment.