whoops guess that got missed in the refactor. this also adds our first functional test! to reproduce the problem since unit tests didn't catch it. unfortunately i'm still missing something about how the functional TestApp is supposed to work, in conjunction with the test DB etc. seems to be acting strangely with regard to permission checks especially...
30 lines
625 B
Python
30 lines
625 B
Python
# -*- coding: utf-8; -*-
|
|
"""
|
|
Tasks for wuttaweb
|
|
"""
|
|
|
|
import os
|
|
import shutil
|
|
|
|
from invoke import task
|
|
|
|
|
|
@task
|
|
def release(c, skip_tests=False):
|
|
"""
|
|
Release a new version of WuttJamaican
|
|
"""
|
|
if not skip_tests:
|
|
c.run("pytest -m 'not versioned and not functional'")
|
|
c.run("pytest -m 'versioned'")
|
|
c.run("pytest -m 'functional'")
|
|
|
|
# rebuild pkg
|
|
if os.path.exists("dist"):
|
|
shutil.rmtree("dist")
|
|
if os.path.exists("WuttJamaican.egg-info"):
|
|
shutil.rmtree("WuttJamaican.egg-info")
|
|
c.run("python -m build --sdist")
|
|
|
|
# upload
|
|
c.run("twine upload dist/*")
|