summaryrefslogtreecommitdiffhomepage
path: root/tasks.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2016-12-09 10:26:26 -0800
committerJeff Forcier <jeff@bitprophet.org>2016-12-09 10:40:29 -0800
commitc275c9d86711136cef2afabd91887505330a6430 (patch)
tree89247fe5653fc217d6deeecf32b009959392b53d /tasks.py
parentc6b209dd5690807d8e8e55518c409b164ac2e383 (diff)
Weave in newer release invocations tasks
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/tasks.py b/tasks.py
index 90ee758c..61319aa9 100644
--- a/tasks.py
+++ b/tasks.py
@@ -4,7 +4,7 @@ from shutil import rmtree, copytree
from invoke import Collection, task
from invocations.docs import docs, www, sites
-from invocations.packaging import publish
+from invocations.packaging.release import ns as release_coll, publish
# Until we move to spec-based testing
@@ -24,10 +24,12 @@ def coverage(ctx):
# Until we stop bundling docs w/ releases. Need to discover use cases first.
+# TODO: would be nice to tie this into our own version of build() too, but
+# still have publish() use that build()...really need to try out classes!
@task
def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False):
"""
- Wraps invocations.packaging.release to add baked-in docs folder.
+ Wraps invocations.packaging.publish to add baked-in docs folder.
"""
# Build docs first. Use terribad workaround pending invoke #146
ctx.run("inv docs")
@@ -41,5 +43,22 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False):
# Remind
print("\n\nDon't forget to update RTD's versions page for new minor releases!")
+# TODO: "replace one task with another" needs a better public API, this is
+# using unpublished internals & skips all the stuff add_task() does re:
+# aliasing, defaults etc.
+release_coll.tasks['publish'] = release
-ns = Collection(test, coverage, release, docs, www, sites)
+ns = Collection(test, coverage, release_coll, docs, www, sites)
+ns.configure({
+ 'packaging': {
+ # NOTE: many of these are also set in kwarg defaults above; but having
+ # them here too means once we get rid of our custom release(), the
+ # behavior stays.
+ 'sign': True,
+ 'wheel': True,
+ 'changelog_file': join(
+ www.configuration()['sphinx']['source'],
+ 'changelog.rst',
+ ),
+ },
+})