Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base: 14579e9ad3f1^
...
compare: 8a8b9038db2e
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 46 additions and 0 deletions.
  1. +46 −0 fabfile.py
46 fabfile.py
View
@@ -114,5 +114,51 @@ def task_startMaintenanceSite(self):
run('{}/start-maintenance'.format(self.binDir))
+ def task_uploadRelease(self, release, releasesTarball):
+ """
+ Upload a relase.
+
+ It expects a tarball containing the following files:
+ - Twisted<Subproject>-<release>.tar.bz2
+ - Twisted-<release>.<ext> for all source/windows installers
+ - twisted-<release>-<hash>.txt for md5 and sha512
+ - doc - for narative documentation
+ - api - for api documents
+
+ @param release: Release version.
+ @param releasesTarball: Tarball with release tarballs and documentation
+ """
+ apiVersion = '.'.join(release.split('.')[:2])
+ distPaths = {}
+ for ext in ['.tar.bz2',
+ '-cp27-none-win32.whl', '.win32-py2.7.exe', '.win32-py2.7.msi',
+ '.win-amd64-py2.7.msi', '.win-amd64-py2.7.exe', '-cp27-none-win_amd64.whl']:
+ tarball = 'Twisted-{}{}'.format(release, ext)
+ distPaths[tarball] = 'data/releases/Twisted/{}/{}'.format(apiVersion, tarball)
+ for subproject in ['Core', 'Conch', 'Lore', 'Mail', 'Names', 'News', 'Pair', 'Runner', 'Web', 'Words']:
+ tarball = 'Twisted{}-{}.tar.bz2'.format(subproject, release)
+ distPaths[tarball] = 'data/releases/{}/{}/{}'.format(subproject, apiVersion, tarball)
+
+ distPaths['doc'] = 'data/documentation/{}'.format(release)
+ distPaths['api'] = 'data/documentation/{}/api'.format(release)
+ for hash in ['md5sums', 'shasums']:
+ hashFile = 'twisted-{}-{}.txt'.format(release,hash)
+ distPaths[hashFile] = 'data/releases/{}'.format(release)
+
+ directories = [path.dirname(file) for file in distPaths.values()]
+
+ with settings(user=self.serviceUser):
+ run('/bin/mkdir -p {}'.format(' '.join(set(directories))))
+ archive.restore(distPaths, releasesTarball)
+
+
+ def task_updateCurrentDocumentation(self, release):
+ """
+ Update the current link for documentation
+ """
+ with settings(user=self.serviceUser):
+ run('/bin/ln -nsf {} data/documentation/current'.format(release))
+
+
addTasks(globals(), TwistedWeb('t-web').getTasks())

No commit comments for this range

Something went wrong with that request. Please try again.