comparison mxtool/mx.py @ 15818:718034423138

mxtool: fix archive subcommand such that it will return a successful returncode
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 21 May 2014 15:17:21 +0200
parents d54cca247d0b
children 2460aed6c899
comparison
equal deleted inserted replaced
15817:8b24f4684aa0 15818:718034423138
2623 # Correct the permissions on the temporary file which is created with restrictive permissions 2623 # Correct the permissions on the temporary file which is created with restrictive permissions
2624 os.chmod(self.tmpPath, 0o666 & ~currentUmask) 2624 os.chmod(self.tmpPath, 0o666 & ~currentUmask)
2625 # Atomic on Unix 2625 # Atomic on Unix
2626 shutil.move(self.tmpPath, self.path) 2626 shutil.move(self.tmpPath, self.path)
2627 2627
2628 def _archive(args):
2629 archive(args)
2630 return 0
2631
2628 def archive(args): 2632 def archive(args):
2629 """create jar files for projects and distributions""" 2633 """create jar files for projects and distributions"""
2630 parser = ArgumentParser(prog='mx archive') 2634 parser = ArgumentParser(prog='mx archive')
2631 parser.add_argument('names', nargs=REMAINDER, metavar='[<project>|@<distribution>]...') 2635 parser.add_argument('names', nargs=REMAINDER, metavar='[<project>|@<distribution>]...')
2632 args = parser.parse_args(args) 2636 args = parser.parse_args(args)
2640 archives.append(d.path) 2644 archives.append(d.path)
2641 else: 2645 else:
2642 p = project(name) 2646 p = project(name)
2643 archives.append(p.make_archive()) 2647 archives.append(p.make_archive())
2644 2648
2649 logv("generated archives: " + str(archives))
2645 return archives 2650 return archives
2646 2651
2647 def canonicalizeprojects(args): 2652 def canonicalizeprojects(args):
2648 """process all project files to canonicalize the dependencies 2653 """process all project files to canonicalize the dependencies
2649 2654
4692 'fsckprojects': [fsckprojects, ''], 4697 'fsckprojects': [fsckprojects, ''],
4693 'help': [help_, '[command]'], 4698 'help': [help_, '[command]'],
4694 'ideclean': [ideclean, ''], 4699 'ideclean': [ideclean, ''],
4695 'ideinit': [ideinit, ''], 4700 'ideinit': [ideinit, ''],
4696 'intellijinit': [intellijinit, ''], 4701 'intellijinit': [intellijinit, ''],
4697 'archive': [archive, '[options]'], 4702 'archive': [_archive, '[options]'],
4698 'projectgraph': [projectgraph, ''], 4703 'projectgraph': [projectgraph, ''],
4699 'pylint': [pylint, ''], 4704 'pylint': [pylint, ''],
4700 'javap': [javap, '<class name patterns>'], 4705 'javap': [javap, '<class name patterns>'],
4701 'javadoc': [javadoc, '[options]'], 4706 'javadoc': [javadoc, '[options]'],
4702 'site': [site, '[options]'], 4707 'site': [site, '[options]'],