Commit ea5e7744 authored by Nicolas Boulenguez's avatar Nicolas Boulenguez

Import upstream version 1.4.5

parent 76d5d40b
......@@ -74,11 +74,19 @@ sdist_linux: prepare changes templates dist/TaskCoach-$(TCVERSION).tar.gz
sdist_ubuntu: sdist_linux
# Launchpad does not support one size fits all packages...
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu12~precise.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu12~quantal.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu13~raring.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu13~saucy.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu14~trusty.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu14~utopic.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu15~vivid.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu15~wily.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu16~xenial.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu16~yakkety.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu17~zesty.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu17~artful.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu18~bionic.tar.gz
cp dist/TaskCoach-$(TCVERSION).tar.gz dist/taskcoach_$(TCVERSION)-0ubuntu18~cosmic.tar.gz
sdist_raw:
mkdir -p dist
......@@ -115,33 +123,69 @@ deb: sdist_linux
ubuntu: sdist_ubuntu
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu precise 12 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu12~precise.tar.gz
mv build build-precise
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu quantal 12 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu12~quantal.tar.gz
mv build build-quantal
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu raring 13 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu13~raring.tar.gz
mv build build-raring
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu saucy 13 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu13~saucy.tar.gz
mv build build-saucy
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu trusty 14 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu14~trusty.tar.gz
mv build build-trusty
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu utopic 14 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu14~utopic.tar.gz
mv build build-utopic
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu vivid 15 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu15~vivid.tar.gz
mv build build-vivid
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu wily 15 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu15~wily.tar.gz
mv build build-wily
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu xenial 16 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu16~xenial.tar.gz
mv build build-xenial
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu yakkety 16 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu16~yakkety.tar.gz
mv build build-yakkety
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu zesty 17 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu17~zesty.tar.gz
mv build build-zesty
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu artful 17 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu17~artful.tar.gz
mv build build-artful
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu bionic 18 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu18~bionic.tar.gz
mv build build-bionic
LC_ALL=C $(PYTHON) pymake.py bdist_ubuntu cosmic 18 --sdist=dist/taskcoach_$(TCVERSION)-0ubuntu18~cosmic.tar.gz
mv build build-cosmic
ppa_sign: ubuntu
cd build-precise; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu12~precise-1_source.changes
cd build-quantal; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu12~quantal-1_source.changes
cd build-raring; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu13~raring-1_source.changes
cd build-saucy; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu13~saucy-1_source.changes
cd build-trusty; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu14~trusty-1_source.changes
cd build-utopic; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu14~utopic-1_source.changes
cd build-vivid; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu15~vivid-1_source.changes
cd build-wily; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu15~wily-1_source.changes
cd build-xenial; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu16~xenial-1_source.changes
cd build-yakkety; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu16~yakkety-1_source.changes
cd build-zesty; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu17~zesty-1_source.changes
cd build-artful; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu17~artful-1_source.changes
cd build-bionic; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu18~bionic-1_source.changes
cd build-cosmic; debsign --re-sign -k0x$(PGPID) taskcoach_$(TCVERSION)-0ubuntu18~cosmic-1_source.changes
# Split PPA by version because the upload has a tendency to fail so the buildbot must retry
ppa_rel_precise:
cd build-precise; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu12~precise-1_source.changes
ppa_rel_quantal:
cd build-quantal; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu12~quantal-1_source.changes
ppa_rel_raring:
cd build-raring; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu13~raring-1_source.changes
ppa_rel_saucy:
cd build-saucy; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu13~saucy-1_source.changes
ppa_rel_trusty:
cd build-trusty; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu14~trusty-1_source.changes
ppa_rel_utopic:
cd build-utopic; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu14~utopic-1_source.changes
ppa_rel_vivid:
cd build-vivid; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu15~vivid-1_source.changes
......@@ -151,15 +195,39 @@ ppa_rel_wily:
ppa_rel_xenial:
cd build-xenial; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu16~xenial-1_source.changes
ppa_rel_yakkety:
cd build-yakkety; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu16~yakkety-1_source.changes
ppa_rel_zesty:
cd build-zesty; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu17~zesty-1_source.changes
ppa_rel_artful:
cd build-artful; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu17~artful-1_source.changes
ppa_rel_bionic:
cd build-bionic; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu18~bionic-1_source.changes
ppa_rel_cosmic:
cd build-cosmic; dput ppa:taskcoach-developers/release-snapshot taskcoach_$(TCVERSION)-0ubuntu18~cosmic-1_source.changes
ppa_relnext_precise:
cd build-precise; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu12~precise-1_source.changes
ppa_relnext_quantal:
cd build-quantal; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu12~quantal-1_source.changes
ppa_relnext_raring:
cd build-raring; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu13~raring-1_source.changes
ppa_relnext_saucy:
cd build-saucy; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu13~saucy-1_source.changes
ppa_relnext_trusty:
cd build-trusty; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu14~trusty-1_source.changes
ppa_relnext_utopic:
cd build-utopic; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu14~utopic-1_source.changes
ppa_relnext_vivid:
cd build-vivid; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu15~vivid-1_source.changes
......@@ -169,15 +237,39 @@ ppa_relnext_wily:
ppa_relnext_xenial:
cd build-xenial; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu16~xenial-1_source.changes
ppa_relnext_yakkety:
cd build-yakkety; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu16~yakkety-1_source.changes
ppa_relnext_zesty:
cd build-zesty; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu17~zesty-1_source.changes
ppa_relnext_artful:
cd build-artful; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu17~artful-1_source.changes
ppa_relnext_bionic:
cd build-bionic; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu18~bionic-1_source.changes
ppa_relnext_cosmic:
cd build-cosmic; dput ppa:taskcoach-developers/nextrelease-snapshot taskcoach_$(TCVERSION)-0ubuntu18~cosmic-1_source.changes
ppa_release_precise:
cd build-precise; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu12~precise-1_source.changes
ppa_release_quantal:
cd build-quantal; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu12~quantal-1_source.changes
ppa_release_raring:
cd build-raring; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu13~raring-1_source.changes
ppa_release_saucy:
cd build-saucy; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu13~saucy-1_source.changes
ppa_release_trusty:
cd build-trusty; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu14~trusty-1_source.changes
ppa_release_utopic:
cd build-utopic; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu14~utopic-1_source.changes
ppa_release_vivid:
cd build-vivid; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu15~vivid-1_source.changes
......@@ -187,9 +279,21 @@ ppa_release_wily:
ppa_release_xenial:
cd build-xenial; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu16~xenial-1_source.changes
ppa_release_yakkety:
cd build-yakkety; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu16~yakkety-1_source.changes
ppa_release_zesty:
cd build-zesty; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu17~zesty-1_source.changes
ppa_release_artful:
cd build-artful; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu17~artful-1_source.changes
ppa_release_bionic:
cd build-bionic; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu18~bionic-1_source.changes
ppa_release_cosmic:
cd build-cosmic; dput ppa:taskcoach-developers/ppa taskcoach_$(TCVERSION)-0ubuntu18~cosmic-1_source.changes
app: prepare
$(PYTHON) pymake.py py2app
chmod 644 "build/Task Coach/TaskCoach.app/Contents/Resources/taskcoach.py"
......
* TaskCoach would not start on Fedora 23 using LXDE. This probably concerns
other distributions as well.
* Fix an exception that would fill up the log on Linux
* Reminders would fire randomly or not at all.
* Per-task effort total time consolidation, patch provided by
rogerdc@gmail.com
* Add a viewer for task dependencies based on igraph (contributed by
Matthias Tafelmeier). Not available on all platforms.
* Task Coach now uses Mercurial for version control. This only affects you
if you want to develop or use Task Coach source code.
* All Ubuntu versions since precise have now a PPA
......@@ -22,6 +22,16 @@ from changetypes import *
releases = [
Release('1.4.5', 'March 24, 2019',
summary='''This is a mixed feature and bugfix release.''',
bugsFixed=[
Bugv2('''Fix an exception that would fill up the log on Linux'''),
],
featuresAdded=[
Feature('''All Ubuntu versions since precise have now a PPA'''),
],
),
Release('1.4.4', 'December 2, 2018',
summary='''This is a mixed feature and bugfix release.''',
bugsFixed=[
......
......@@ -88,9 +88,9 @@ iconlist = [
('chat_icon', 'apps', 'chat', [16]),
('checkmark_green_icon', 'actions', 'apply', [16]),
('checkmark_green_icon_multiple', 'actions', 'apply_multiple', [16]),
('clock_icon', 'apps', 'clock', [16, 22, 32, 128]),
('clock_icon', 'apps', 'clock', [16, 22, 32, 48, 128]),
('clock_alarm_icon', 'actions', 'kalarm', [16]),
('clock_stopwatch_icon', 'apps', 'ktimer', [16, 128]),
('clock_stopwatch_icon', 'apps', 'ktimer', [16, 48, 128]),
('clock_stop_icon', 'actions', 'history_stop', [16, 22, 32]),
('clock_resume_icon', 'actions', 'history_resume', [16, 22, 32]),
('clock_menu_icon', 'actions', 'historymenu', [16, 22, 32]),
......
......@@ -20,9 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import wxversion, sys
wxversion.ensureMinimal("2.8")
sys.path.append('../tools')
import os, img2py
import os
from wx.tools import img2py
def extractIcon(iconZipFile, pngFilename, pngZipped):
pngFile = file(pngFilename, 'wb')
......
......@@ -23,8 +23,10 @@ import sys
PYTHONEXE = sys.executable
import struct
if sys.platform == 'darwin' and len(struct.pack('L', 0)) == 8:
raise RuntimeError('Please use python-32 to run this script')
if sys.platform == 'darwin':
if len(struct.pack('L', 0)) == 8:
# arch -i386 <path to python> release.py ...
raise RuntimeError('Please use 32 bits python to run this script')
HELP_TEXT = '''
......@@ -40,7 +42,7 @@ Release steps:
- Run 'python release.py release' to build the distributions, upload and download them
to/from Sourceforge, generate MD5 digests, generate the website, upload the
website to the Dreamhost and Hostland websites, announce the release on
Twitter, Identi.ca, Freecode and PyPI (Python Package Index), mark the bug reports
Twitter, and PyPI (Python Package Index), mark the bug reports
on SourceForge fixed-and-released, send the
announcement email, mark .dmg and .exe files as default downloads for their
platforms, and to tag the release in Mercurial.
......@@ -78,7 +80,6 @@ try:
except ImportError:
import json
# pylint: disable=W0621,W0613
......@@ -101,19 +102,15 @@ class Settings(ConfigParser.SafeConfigParser, object):
self.read(self.filename)
def set_defaults(self):
defaults = dict(sourceforge=['username', 'password', 'consumer_key',
defaults = dict(webhost=['hostname', 'username', 'path'],
sourceforge=['username', 'password', 'consumer_key',
'consumer_secret', 'oauth_token',
'oauth_token_secret', 'api_key'],
smtp=['hostname', 'port', 'username', 'password',
'sender_name', 'sender_email_address'],
dreamhost=['hostname', 'username', 'password',
'folder'],
hostland=['hostname', 'username', 'password', 'folder'],
pypi=['username', 'password'],
twitter=['consumer_key', 'consumer_secret',
'oauth_token', 'oauth_token_secret'],
identica=['username', 'password'],
freecode=['auth_code'],
buildbot=['username', 'password', 'host'])
for section in defaults:
self.add_section(section)
......@@ -208,6 +205,36 @@ Thanks, Task Coach development team''')])
print 'Warning: could not marking fix #%s released.' % id_
class FOSSHubAPI:
def __init__(self, api_key):
self.api_key = api_key
self.baseuri = 'https://api.fosshub.com/rest/'
self.connection = httplib.HTTPSConnection('api.fosshub.com')
def get(self, endpoint, **headers):
headers['X-Auth-Key'] = self.api_key
self.connection.request('GET', '%s%s' % (self.baseuri, endpoint), headers=headers)
response = self.connection.getresponse()
if response.status != 200:
raise RuntimeError('Request failed: %d %s' % (response.status, response.reason))
data = json.load(response)
if data['error'] is not None:
raise RuntimeError('Request failed: %s %s' % (data['code'], data['text']))
return data['data']
def post(self, endpoint, data, **headers):
headers['X-Auth-Key'] = self.api_key
headers['Content-Type'] = 'application/json'
self.connection.request('POST', '%s%s' % (self.baseuri, endpoint), json.dumps(data), headers)
response = self.connection.getresponse()
if response.status != 200:
raise RuntimeError('Request failed: %d %s' % (response.status, response.reason))
data = json.load(response)
if data['error'] is not None:
raise RuntimeError('Request failed: %s %s' % (data['code'], data['text']))
return data['status']
def sourceforge_location(settings):
metadata = taskcoachlib.meta.data.metaDict
project = metadata['filename_lower']
......@@ -306,11 +333,57 @@ def building_packages(settings, options):
os.remove(os.path.join('dist', 'release.zip'))
@progress
def uploading_distributions_to_host(settings, options):
host = settings.get('webhost', 'hostname')
user = settings.get('webhost', 'username')
path = settings.get('webhost', 'distpath')
os.system('rsync dist/ -avP %s@%s:%s' % (user, host, path))
@progress
def uploading_distributions_to_SourceForge(settings, options):
rsync(settings, options, 'rsync -avP -e ssh dist/* %s')
def uploading_distributions_to_fosshub(settings, options):
api = FOSSHubAPI(settings.get('fosshub', 'api_key'))
# Play it safe.
for project in api.get('projects'):
if project['name'] == 'Task Coach':
project_id = project['id']
break
else:
raise RuntimeError('Cannot find Task Coach project on FOSSHub')
for release in api.get('projects/%s/releases' % project_id):
if release['version'] == taskcoachlib.meta.data.version:
print 'Version %s already published' % release['version']
import pprint
pprint.pprint(release)
return
metadata = taskcoachlib.meta.data.metaDict
changelog = latest_release(metadata)
data = {'version': taskcoachlib.meta.data.version, 'changeLog': changelog, 'publish': True, 'files': []}
for filetmpl, type_ in [
('TaskCoach-%s-win32.exe', '32-bit Windows Installer'),
('TaskCoach-%s.dmg', 'OS X'),
('X-TaskCoach_%s_rev1.zip', 'Portable (WinPenPack Format)'),
('TaskCoachPortable_%s.paf.exe', 'Portable (PortableApps Format)'),
]:
filedata = {'fileUrl': '%s%s' % (settings.get('webhost', 'disturl'), filetmpl % taskcoachlib.meta.data.version), 'type': type_, 'version': taskcoachlib.meta.data.version}
data['files'].append(filedata)
api.post('projects/%s/releases' % project_id, data)
def uploading_distributions(settings, options):
uploading_distributions_to_host(settings, options)
uploading_distributions_to_SourceForge(settings, options)
uploading_distributions_to_fosshub(settings, options)
@progress
def marking_default_downloads(settings, options):
defaults = list()
......@@ -434,46 +507,22 @@ class SimpleFTP(ftplib.FTP, object):
self.retrbinary('RETR %s' % filename, open(filename, 'wb').write)
def uploading_website_to_website_host(settings, options, website_host,
*filename_whitelist):
settings_section = website_host.lower()
hostname = settings.get(settings_section, 'hostname')
username = settings.get(settings_section, 'username')
password = settings.get(settings_section, 'password')
folder = settings.get(settings_section, 'folder')
if hostname and username and password and folder:
ftp = SimpleFTP(hostname, username, password, folder)
os.chdir('website.out')
if options.dry_run:
print 'Skipping ftp.put(website.out).'
else:
ftp.put('.', *filename_whitelist)
ftp.quit()
os.chdir('..')
else:
print 'Warning: cannot upload website to %s; missing credentials' % \
website_host
@progress
def uploading_website_to_Dreamhost(settings, options, *args):
uploading_website_to_website_host(settings, options, 'Dreamhost', *args)
@progress
def uploading_website_to_Hostland(settings, options, *args):
uploading_website_to_website_host(settings, options, 'Hostland', *args)
@progress
def registering_with_PyPI(settings, options):
import setuptools
if tuple(map(int, setuptools.__version__.split('.'))) < (27, 0):
raise RuntimeError('Need at least setuptools 27 to upload on PyPi')
username = settings.get('pypi', 'username')
password = settings.get('pypi', 'password')
pypirc = file('.pypirc', 'w')
pypirc.write('[server-login]\nusername = %s\npassword = %s\n' % \
(username, password))
pypirc.close()
with open('.pypirc', 'w') as pypirc:
pypirc.write('[distutils]\n')
pypirc.write('index-servers =\n')
pypirc.write(' pypi\n')
pypirc.write('[pypi]\n')
pypirc.write('repository=https://upload.pypi.org/legacy/\n')
pypirc.write('username=%s\n' % username)
pypirc.write('password=%s\n' % password)
# pylint: disable=W0404
from setup import setupOptions
languages_pypi_does_not_know = ['Basque', 'Belarusian', 'Breton',
......@@ -489,7 +538,8 @@ def registering_with_PyPI(settings, options):
from distutils.core import setup
del sys.argv[1:]
os.environ['HOME'] = '.'
sys.argv.append('register')
sys.argv.append('sdist')
sys.argv.append('upload')
if options.dry_run:
print 'Skipping PyPI registration.'
else:
......@@ -497,44 +547,6 @@ def registering_with_PyPI(settings, options):
os.remove('.pypirc')
def postRequest(connection, api_call, body, contentType, ok=200, **headers):
headers['Content-Type'] = contentType
connection.request('POST', api_call, body, headers)
response = connection.getresponse()
if response.status != ok:
print 'Request failed: %d %s' % (response.status, response.reason)
return False
return True
def httpPostRequest(host, api_call, body, contentType, ok=200, port=80, **headers):
connection = httplib.HTTPConnection(host, port)
return postRequest(connection, api_call, body, contentType, ok, **headers)
def httpsPostRequest(host, api_call, body, contentType, ok=200, **headers):
connection = httplib.HTTPSConnection(host)
return postRequest(connection, api_call, body, contentType, ok, **headers)
@progress
def announcing_on_Freecode(settings, options):
auth_code = settings.get('freecode', 'auth_code')
metadata = taskcoachlib.meta.data.metaDict
version = '%(version)s' % metadata
changelog = latest_release(metadata, summary_only=True)
tag = 'Feature enhancements' if version.endswith('.0') else 'Bug fixes'
release = dict(version=version, changelog=changelog, tag_list=tag)
body = codecs.encode(json.dumps(dict(auth_code=auth_code,
release=release)))
path = '/projects/taskcoach/releases.json'
host = 'freecode.com'
if options.dry_run:
print 'Skipping announcing "%s" on %s.' % (release, host)
else:
httpsPostRequest(host, path, body, 'application/json', ok=201)
def status_message():
''' Return a brief status message for e.g. Twitter. '''
metadata = taskcoachlib.meta.data.metaDict
......@@ -542,23 +554,6 @@ def status_message():
"See what's new at %(url)schanges.html." % metadata
def announcing_via_Basic_Auth_Api(settings, options, section, host,
api_prefix=''):
credentials = ':'.join(settings.get(section, credential) \
for credential in ('username', 'password'))
basic_auth = base64.encodestring(credentials)[:-1]
status = status_message()
api_call = api_prefix + '/statuses/update.json'
body = '='.join((urllib.quote(body_part.encode('utf-8')) \
for body_part in ('status', status)))
if options.dry_run:
print 'Skipping announcing "%s" on %s.' % (status, host)
else:
httpPostRequest(host, api_call, body,
'application/x-www-form-urlencoded; charset=utf-8',
Authorization='Basic %s' % basic_auth)
def announcing_via_OAuth_Api(settings, options, section, host):
consumer_key = settings.get(section, 'consumer_key')
consumer_secret = settings.get(section, 'consumer_secret')
......@@ -570,12 +565,13 @@ def announcing_via_OAuth_Api(settings, options, section, host):
status = status_message()
if options.dry_run:
print 'Skipping announcing "%s" on %s.' % (status, host)
else:
response, dummy_content = client.request( \
'http://api.%s/1.1/statuses/update.json' % host, method='POST',
else:
response, content = client.request( \
'https://api.%s/1.1/statuses/update.json' % host, method='POST',
body='status=%s' % status, headers=None)
if response.status != 200:
print 'Request failed: %d %s' % (response.status, response.reason)
print content
@progress
......@@ -583,24 +579,17 @@ def announcing_on_Twitter(settings, options):
announcing_via_OAuth_Api(settings, options, 'twitter', 'twitter.com')
@progress
def announcing_on_Identica(settings, options):
announcing_via_Basic_Auth_Api(settings, options, 'identica', 'identi.ca',
'/api')
def uploading_website(settings, options):
''' Upload the website contents to the website(s). '''
host = settings.get('webhost', 'hostname')
user = settings.get('webhost', 'username')
path = settings.get('webhost', 'path')
os.system('rsync website.out/ -avP %s@%s:%s' % (user, host, path))
def uploading_website(settings, options, *args):
''' Upload the website contents to the website(s). If args is present
only the files specified in args are uploaded. '''
#uploading_website_to_Dreamhost(settings, options, *args)
uploading_website_to_Hostland(settings, options, *args)
def announcing(settings, options):
registering_with_PyPI(settings, options)
announcing_on_Twitter(settings, options)
announcing_on_Identica(settings, options)
announcing_on_Freecode(settings, options)
mailing_announcement(settings, options)
......@@ -741,16 +730,15 @@ def tagging_release_in_mercurial(settings, options):
COMMANDS = dict(release=releasing,
build=building_packages,
upload=uploading_distributions_to_SourceForge,
uploaddist=uploading_distributions_to_host,
uploadsf=uploading_distributions_to_SourceForge,
uploadfoss=uploading_distributions_to_fosshub,
upload=uploading_distributions,
download=downloading_distributions_from_SourceForge,
md5=generating_MD5_digests,
websitegen=generating_website,
website=uploading_website,
websiteDH=uploading_website_to_Dreamhost,
websiteHL=uploading_website_to_Hostland,
twitter=announcing_on_Twitter,
identica=announcing_on_Identica,
freecode=announcing_on_Freecode,
pypi=registering_with_PyPI,
mail=mailing_announcement,
announce=announcing,
......
......@@ -22,11 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# Edit these for every release:
version = '1.4.4' # Current version number of the application
version = '1.4.5' # Current version number of the application
tskversion = 37 # Current version number of the task file format, changed to 37 for release 1.3.23.
release_day = '2' # Day number of the release, 1-31, as string
release_month = 'December' # Month of the release in plain English
release_year = '2018' # Year of the release as string
release_day = '24' # Day number of the release, 1-31, as string
release_month = 'March' # Month of the release in plain English
release_year = '2019' # Year of the release as string
release_status = 'stable' # One of 'alpha', 'beta', 'stable'
# No editing needed below this line for doing a release.
......
......@@ -2,7 +2,7 @@
make ppa_sign || exit 1
for versionName in precise trusty vivid wily xenial bionic; do
for versionName in precise quantal raring saucy trusty utopic vivid wily xenial yakkety zesty artful bionic cosmic; do
for retryCount in 1 2 3 4 5 6 7 8 9 10; do
make ppa_${1}_$versionName && break
sleep 20
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment