From fffaa97f5587903c9c999d8d11d43a61aece9c45 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 19 Apr 2009 12:01:02 +0100 Subject: [PATCH] Revert "Added 'autopublish' command" This command was intended for 0release, but that didn't use it in the end. The name is confusingly similar to autocompile, but doesn't work the same way. This reverts commit d82afa3d47b8449e59f3d006331926054e80bf1d. --- 0compile.1 | 9 --------- publish.py | 26 ++++---------------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/0compile.1 b/0compile.1 index 4024112..66e88c1 100644 --- a/0compile.1 +++ b/0compile.1 @@ -15,9 +15,6 @@ .B 0compile publish [\fBDOWNLOAD-BASE-URL\fP] -.B 0compile autopublish -[\fBDOWNLOAD-BASE-URL\fP] - .B 0compile clean .B 0compile copy-src @@ -89,12 +86,6 @@ The command will also create an XML file which can be used to download and run t Deletes the 'build' and distribution directories, if present. -.SH AUTOPUBLISH - -Convenience command, which does "clean, build, publish, clean". On success, -this results in a new package archive and a feed file generated from a clean -build. On failure, the build directories remain for investigation. - .SH COPY-SRC .PP diff --git a/publish.py b/publish.py index a1c2ecd..71ea4f0 100644 --- a/publish.py +++ b/publish.py @@ -7,33 +7,15 @@ from xml.dom import minidom from support import * -def ensure_download_base(buildenv, args): +def do_publish(args): + """publish [ DOWNLOAD-BASE-URL ]""" + buildenv = BuildEnv() if len(args) == 0: if not buildenv.download_base_url: raise SafeException("No download base set. Give the URL for a remote directory.") elif len(args) == 1: buildenv.config.set('compile', 'download-base-url', args[0]) buildenv.save() - else: - raise __main__.UsageError() - -def do_autopublish(args): - """autopublish [ DOWNLOAD-BASE-URL ]""" - import clean - import build - - buildenv = BuildEnv() - ensure_download_base(buildenv, args) - - clean.do_clean([]) - build.do_build([]) - do_publish([]) - clean.do_clean([]) - -def do_publish(args): - """publish [ DOWNLOAD-BASE-URL ]""" - buildenv = BuildEnv() - ensure_download_base(buildenv, args) info("Using download base URL: %s", buildenv.download_base_url) @@ -65,4 +47,4 @@ def do_publish(args): print "Once uploaded, you can download and run with:" print "$ 0launch %s" % buildenv.local_download_iface -__main__.commands += [do_autopublish, do_publish] +__main__.commands.append(do_publish) -- 2.11.4.GIT