Example #1
0
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:
        tag_elem = tag_line.split (' ')
        if not (tag_elem[-1] == '?' or tag_elem[-1] == ''):
            previous_version = tag_elem[0]
            break

changelog = quicklyutils.collect_commit_messages(previous_version)
# creation/update debian packaging
return_code = packaging.updatepackaging(changelog, installopt=True)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# add files, setup release version, commit and push !
#TODO: check or fix if we don't have an ssh key (don't tag otherwise to be able to release again)
packaging.filter_exec_command(["bzr", "add"])
return_code = packaging.filter_exec_command(["bzr", "commit", '-m', commit_msg])
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)
packaging.filter_exec_command(["bzr", "tag", release_version]) # tag revision

# check if pull branch is set
bzr_instance = subprocess.Popen(["bzr", "info"], stdout=subprocess.PIPE)
            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.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)
Example #3
0
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:
        tag_elem = tag_line.split (' ')
        if not (tag_elem[-1] == '?' or tag_elem[-1] == ''):
            previous_version = tag_elem[0]
            break

changelog = quicklyutils.collect_commit_messages(previous_version)
# creation/update debian packaging
return_code = packaging.updatepackaging(changelog)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# add files, setup release version, commit and push !
#TODO: check or fix if we don't have an ssh key (don't tag otherwise to be able to release again)
packaging.filter_exec_command(["bzr", "add"])
return_code = packaging.filter_exec_command(["bzr", "commit", '-m', commit_msg])
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)
packaging.filter_exec_command(["bzr", "tag", release_version]) # tag revision

# check if pull branch is set
bzr_instance = subprocess.Popen(["bzr", "info"], stdout=subprocess.PIPE)
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:
        tag_elem = tag_line.split(' ')
        if not (tag_elem[-1] == '?' or tag_elem[-1] == ''):
            previous_version = tag_elem[0]
            break

changelog = quicklyutils.collect_commit_messages(previous_version)
# creation/update debian packaging
return_code = packaging.updatepackaging(changelog, installopt=True)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# add files, setup release version, commit and push !
#TODO: check or fix if we don't have an ssh key (don't tag otherwise to be able to release again)
packaging.filter_exec_command(["bzr", "add"])
return_code = packaging.filter_exec_command(
    ["bzr", "commit", '-m', commit_msg])
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)
packaging.filter_exec_command(["bzr", "tag", release_version])  # tag revision

# check if pull branch is set
Example #5
0
# license if needed (default with author in setup.py and GPL-3). Don't change anything if not needed
try:
    license.licensing()
except license.LicenceError, error_message:
    print(error_message)
    sys.exit(1)

try:
    release_version = packaging.updateversion(sharing=True)
except (packaging.invalid_versionning_scheme,
        packaging.invalid_version_in_setup), error_message:
    print(error_message)
    sys.exit(1)

# creation/update debian packaging
return_code = packaging.updatepackaging()
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# upload to launchpad
print _("pushing to launchpad")
return_code = packaging.push_to_ppa(dput_ppa_name,
                                    "../%s_%s_source.changes" %
                                    (project_name, release_version),
                                    keyid=keyid) != 0
if return_code != 0:
    sys.exit(return_code)

print _(
    "%s %s is building on Launchpad. Wait for half an hour and have look at %s."
Example #6
0
            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)
Example #7
0
# license if needed (default with author in setup.py and GPL-3). Don't change anything if not needed
try:
    license.licensing()
except license.LicenceError, error_message:
    print(error_message)
    sys.exit(1)

try:
    release_version = packaging.updateversion(sharing=True)
except (packaging.invalid_versionning_scheme,
        packaging.invalid_version_in_setup), error_message:
    print(error_message)
    sys.exit(1)

# creation/update debian packaging
return_code = packaging.updatepackaging(installopt=for_extras)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# upload to launchpad
print _("pushing to launchpad")
return_code = packaging.push_to_ppa(dput_ppa_name,
                                    "../%s_%s_source.changes" %
                                    (project_name, release_version),
                                    keyid=keyid) != 0
if return_code != 0:
    sys.exit(return_code)

print _(
    "%s %s is building on Launchpad. Wait for half an hour and have look at %s."
Example #8
0
# license if needed (default with author in setup.py and GPL-3). Don't change anything if not needed
try:
    license.licensing()
except license.LicenceError, error_message:
    print(error_message)
    sys.exit(1)

try:
    release_version = packaging.updateversion(sharing=True)
except (packaging.invalid_versionning_scheme,
        packaging.invalid_version_in_setup), error_message:
    print(error_message)
    sys.exit(1)

# creation/update debian packaging
return_code = packaging.updatepackaging()
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# upload to launchpad
print _("pushing to launchpad")
return_code = packaging.push_to_ppa(dput_ppa_name, "../%s_%s_source.changes" % (project_name, release_version), keyid=keyid) != 0
if return_code != 0:
    sys.exit(return_code)


print _("%s %s is building on Launchpad. Wait for half an hour and have look at %s.") % (project_name, release_version, ppa_url)

sys.exit(0)
Example #9
0
# license if needed (default with author in setup.py and GPL-3). Don't change anything if not needed
try:
    license.licensing()
except license.LicenceError, error_message:
    print(error_message)
    sys.exit(1)

try:
    release_version = packaging.updateversion(sharing=True)
except (packaging.invalid_versionning_scheme,
        packaging.invalid_version_in_setup), error_message:
    print(error_message)
    sys.exit(1)

# creation/update debian packaging
return_code = packaging.updatepackaging(installopt=for_extras)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# upload to launchpad
print _("pushing to launchpad")
return_code = packaging.push_to_ppa(dput_ppa_name, "../%s_%s_source.changes" % (project_name, release_version), keyid=keyid) != 0
if return_code != 0:
    sys.exit(return_code)


print _("%s %s is building on Launchpad. Wait for half an hour and have look at %s.") % (project_name, release_version, ppa_url)

sys.exit(0)
Example #10
0
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:
        tag_elem = tag_line.split(' ')
        if not (tag_elem[-1] == '?' or tag_elem[-1] == ''):
            previous_version = tag_elem[0]
            break

changelog = quicklyutils.collect_commit_messages(previous_version)
# creation/update debian packaging
return_code = packaging.updatepackaging(changelog)
if return_code != 0:
    print _("ERROR: can't create or update ubuntu package")
    sys.exit(1)

# add files, setup release version, commit and push !
#TODO: check or fix if we don't have an ssh key (don't tag otherwise to be able to release again)
packaging.filter_exec_command(["bzr", "add"])
return_code = packaging.filter_exec_command(
    ["bzr", "commit", '-m', commit_msg])
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)
packaging.filter_exec_command(["bzr", "tag", release_version])  # tag revision

# check if pull branch is set
Example #11
0
""")
templatetools.handle_additional_parameters(sys.argv, help)

# 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) != 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)