Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcommands/distribute12
-rw-r--r--devbot/build.py18
-rw-r--r--devbot/release.py53
3 files changed, 1 insertions, 82 deletions
diff --git a/commands/distribute b/commands/distribute
deleted file mode 100755
index 6642e1e..0000000
--- a/commands/distribute
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-
-import common
-
-from devbot import build
-
-common.setup()
-
-if not build.distribute():
- sys.exit(1)
diff --git a/devbot/build.py b/devbot/build.py
index 1f486ca..01638c9 100644
--- a/devbot/build.py
+++ b/devbot/build.py
@@ -10,7 +10,6 @@ from devbot import command
from devbot import config
from devbot import state
from devbot import utils
-from devbot import release
from devbot import git
_builders = {}
@@ -186,22 +185,7 @@ def _distribute_autotools(module):
if version_revision is not None:
git_module.checkout(version_revision)
- command.run(["make", "distcheck"])
-
- result = False
-
- if not release.exists(module, filename):
- path = os.path.join(os.getcwd(), filename)
- if release.upload(module, path):
- annotation = git_module.get_annotation("v%s" % version)
- result = release.announce(module, filename, version, annotation)
- else:
- print "Release already uploaded"
-
- if version_revision is not None:
- git_module.checkout()
-
- return result
+ return command.run(["make", "distcheck"])
_distributors["autotools"] = _distribute_autotools
diff --git a/devbot/release.py b/devbot/release.py
deleted file mode 100644
index c82f358..0000000
--- a/devbot/release.py
+++ /dev/null
@@ -1,53 +0,0 @@
-import os
-import subprocess
-import tempfile
-
-upload_host = "shell.sugarlabs.org"
-upload_root = "/upload/sources/sucrose/glucose"
-download_uri = "http://download.sugarlabs.org/sources/sucrose/glucose"
-announce_to = "sugar-devel@lists.sugarlabs.org"
-
-
-def exists(module, filename):
- release_path = os.path.join(upload_root, module.name, filename)
- result = subprocess.call(["ssh", upload_host, "test", "-f", release_path])
- return result == 0
-
-
-def upload(module, path):
- upload_path = os.path.join(upload_root, module.name)
- upload_dest = "%s:%s" % (upload_host, upload_path)
- return subprocess.call(["scp", path, upload_dest]) == 0
-
-
-def announce(module, filename, version, annotation):
- fd, announce_path = tempfile.mkstemp(prefix="announce-")
-
- with os.fdopen(fd, "w") as f:
- f.write("From: %s\n" % _get_email())
- f.write("To: %s\n" % announce_to)
- f.write("Subject: [RELEASE] %s-%s\n" % (module.name, version))
-
- f.write("\n%s\n" % annotation)
- f.write("== Source ==\n\n")
- f.write("%s/%s/%s" % (download_uri, module.name, filename))
-
- result = False
-
- upload_dest = "%s:~" % upload_host
- if subprocess.call(["scp", announce_path, upload_dest]) == 0:
- announce_basename = os.path.basename(announce_path)
-
- if subprocess.call(["ssh", upload_host, "sendmail", "-t",
- "<", announce_basename]):
- result = True
-
- subprocess.check_call(["ssh", upload_host, "rm", announce_basename])
-
- os.unlink(announce_path)
-
- return result
-
-
-def _get_email():
- return subprocess.check_output(['git', 'config', 'user.email']).strip()