Skip to main content

A tiny build automation tool.

Project description

A tiny build automation tool.

Install

pip install coxbuild

Usage

Build Schema

from coxbuild.schema import task, depend, run # this line can be omitted

@task()
def pre():
    print("pre task")


@task()
def echo():
    run(["echo", "Try command invocation."], shell=True)


@depend(echo)
@task()
def git():
    run(["git", "status"])


@task()
def fail():
    run(["exit", "1"], shell=True)


@task()
def retry():
    run(["exit", "1"], shell=True, retry=3)


@depend(git, pre)
@task()
def default():
    pass

Run

coxbuild
    [-D <working directory = '.'>]
    [-f <file name = 'coxbuild.py'>]
    [task names = 'default']

# Run default schema and default task
coxbuild
# equivalent to
coxbuild -D . -f coxbuild.py default

# Run in other directory
coxbuild -D path/to/other

# Run using other file
coxbuild -f other.py

# Run specified task
coxbuild task1 task2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coxbuild-0.0.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

coxbuild-0.0.1-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page