You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
677B

  1. import sys
  2. import os
  3. import glob
  4. import json
  5. def system(cmd):
  6. if os.system(cmd):
  7. raise Exception(f"Failed command: {cmd}")
  8. PACKAGES_DIR = '../packages'
  9. DOWNLOADS_DIR = '../downloads'
  10. for manifest_filename in glob.glob('manifests/*.json'):
  11. slug = os.path.splitext(os.path.basename(manifest_filename))[0]
  12. with open(manifest_filename, "r") as f:
  13. manifest = json.load(f)
  14. if "authorEmail" in manifest:
  15. print(manifest["authorEmail"])
  16. # version = manifest['version']
  17. # arch = 'win'
  18. # package_filename = os.path.join(PACKAGES_DIR, f"{slug}-{version}-{arch}.zip")
  19. # try:
  20. # system(f'cp {package_filename} {DOWNLOADS_DIR}')
  21. # except Exception as e:
  22. # print(e)