# retrieve useful information if not configurationhandler.project_config: configurationhandler.loadConfig() project_name = configurationhandler.project_config['project'] try: release_version = quicklyutils.get_setup_value('version') except quicklyutils.cant_deal_with_setup_value: print _("Release version not found in setup.py.") # creation/update debian packaging if packaging.updatepackaging(no_changelog=True, installopt=for_extras) != 0: print _("ERROR: can't create or update ubuntu package") sys.exit(1) # creating local binary package return_code = packaging.filter_exec_command(["dpkg-buildpackage", "-tc", "-I.bzr", "-us", "-uc"]) if return_code == 0: print _("Ubuntu package has been successfully created in ../%s_%s_all.deb") % (project_name, release_version) else: print _("An error has occurred during package building") sys.exit(return_code)
commit_msg = _('quickly released: %s' % release_version) # check if already released with this name bzr_instance = subprocess.Popen(["bzr", "tags"], stdout=subprocess.PIPE) bzr_tags, err = bzr_instance.communicate() if bzr_instance.returncode != 0: print(err) sys.exit(1) if release_version in bzr_tags: print _( "ERROR: quickly can't release: %s seems to be already released. Choose another name." ) % release_version sys.exit(1) # commit current changes packaging.filter_exec_command(["bzr", "add"]) return_code = packaging.filter_exec_command( ["bzr", "commit", '--unchanged', '-m', _('commit before release')]) if return_code != 0 and return_code != 3: print _("ERROR: quickly can't release as it can't commit with bzr") sys.exit(return_code) # try to get last available version in bzr previous_version = None bzr_instance = subprocess.Popen(['bzr', 'tags', '--sort=time'], stdout=subprocess.PIPE) result, err = bzr_instance.communicate() if bzr_instance.returncode == 0 and result: output = result.split('\n') # pylint: disable=E1103 output.reverse()
if commit_msg is None: commit_msg = _('quickly released: %s' % release_version) # check if already released with this name bzr_instance = subprocess.Popen(["bzr", "tags"], stdout=subprocess.PIPE) bzr_tags, err = bzr_instance.communicate() if bzr_instance.returncode !=0: print(err) sys.exit(1) if release_version in bzr_tags: print _("ERROR: quickly can't release: %s seems to be already released. Choose another name.") % release_version sys.exit(1) # commit current changes packaging.filter_exec_command(["bzr", "add"]) return_code = packaging.filter_exec_command(["bzr", "commit", '--unchanged', '-m', _('commit before release')]) if return_code != 0 and return_code != 3: print _("ERROR: quickly can't release as it can't commit with bzr") sys.exit(return_code) # try to get last available version in bzr previous_version = None bzr_instance = subprocess.Popen(['bzr', 'tags', '--sort=time'], stdout=subprocess.PIPE) result, err = bzr_instance.communicate() if bzr_instance.returncode == 0 and result: output = result.split('\n') # pylint: disable=E1103 output.reverse() for tag_line in output:
cmd = commands.get_command('package', 'git-python-gtk') templatetools.usage_error(_("Unknown option: %s." % arg), cmd=cmd) i += 1 # retrieve useful information if not configurationhandler.project_config: configurationhandler.loadConfig() project_name = configurationhandler.project_config['project'] try: release_version = quicklyutils.get_setup_value('version') except quicklyutils.cant_deal_with_setup_value: print _("Release version not found in setup.py.") # creation/update debian packaging if packaging.updatepackaging(no_changelog=True, installopt=for_extras) != 0: print _("ERROR: can't create or update ubuntu package") sys.exit(1) # creating local binary package return_code = packaging.filter_exec_command( ["dpkg-buildpackage", "-tc", "-I.git", "-us", "-uc"]) if return_code == 0: print _("Ubuntu package has been successfully created in ../%s_%s_all.deb" ) % (project_name, release_version) else: print _("An error has occurred during package building") sys.exit(return_code)