wuttafarm/tasks.py
Lance Edgar 00fd484669 fix: add custom (built) buefy css to repo
this makes things simpler, and no real reason not to include it
2026-02-08 14:07:23 -06:00

39 lines
715 B
Python

# -*- coding: utf-8; -*-
"""
Tasks for WuttaFarm
"""
import os
import shutil
from invoke import task
@task
def release(c, skip_tests=False):
"""
Release a new version of WuttaFarm
"""
if not skip_tests:
# TODO
# c.run("pytest")
pass
if os.path.exists("dist"):
shutil.rmtree("dist")
c.run("python -m build")
c.run("twine upload dist/*")
@task
def update_style(c):
"""
Build/update the `wuttafarm-buefy.css` file
"""
os.chdir("style")
# c.run("nvm use lts/krypton")
c.run("npm install")
c.run("npm run build")
os.chdir(os.pardir)
shutil.copy("style/dist/css/wuttafarm-buefy.css", "src/wuttafarm/web/static/css/")