Commits

Virgil Dupras  committed 6e5978c

Added the --src-pkg packaging option.

  • Participants
  • Parent commits 2e2ad0f

Comments (0)

Files changed (2)

 b60149097cd86d7f7b9ab1a23337fa302650f025 cocoalib
-dcb142a145700c2959d7897ee199c5f4cdd80921 hscommon
+35ac3c18545f0eb39e2442f77f17b03e6213148d hscommon
 28a0def7e0b32876dbd4f4dd47d482a45700e341 qtlib
     copy_source_files(srcpath, packages)
     shutil.copy(op.join('images', ed('dg{}_logo_128.png')), srcpath)
 
+def package_source_tgz(edition):
+    app_version = get_module_version('core_{}'.format(edition))
+    name = 'dupeguru-{}-src-{}.tar.gz'.format(edition, app_version)
+    dest = op.join('build', name)
+    print_and_do('hg archive -t tgz -S {}'.format(dest))
+
 def main():
     args = parse_args()
     conf = json.load(open('conf.json'))
     edition = conf['edition']
     ui = conf['ui']
     dev = conf['dev']
+    if args.src_pkg:
+        print("Creating source package for dupeGuru {}".format(edition.upper()))
+        package_source_tgz(edition)
+        return
     print("Packaging dupeGuru {0} with UI {1}".format(edition.upper(), ui))
     if ui == 'cocoa':
         package_cocoa(edition, args)