~fabrixxm/climatik

ae3cbdab4867cb362d4b6bbd08afc059c5c03fd2 — fabrixxm 1 year, 4 months ago 2101629
Replace Taskfile shell script with Justfile

https://github.com/casey/just
2 files changed, 19 insertions(+), 42 deletions(-)

A Justfile
D Taskfile
A Justfile => Justfile +19 -0
@@ 0,0 1,19 @@
build: test
    pipenv run python3 setup.py bdist_wheel
    pipenv run twine check dist/*

init:
    pipenv install -e .[dev,autocomplete]

clean:
    rm -fr build dist *.egg-info

test:
    pipenv run nose2
    pipenv run mypy -m climatik

upload-dist:
    pipenv run twine upload dist/*

upload-test:
    pipenv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*

D Taskfile => Taskfile +0 -42
@@ 1,42 0,0 @@
#!/usr/bin/env bash
# Taskfile - https://github.com/adriancooney/Taskfile

set -euo pipefail

function clean {
    rm -fr build dist *.egg-info
}

function test {
    nose2
    mypy -m climatik
}

function build {
    test
    python3 setup.py bdist_wheel
    twine check dist/*
}

function upload {
    if [ "${1:-}" == "--dist" ]
    then
        twine upload dist/*
    else
        twine upload --repository-url https://test.pypi.org/legacy/ dist/*
    fi
}

function help {
    echo "$0 <task> <args>"
    echo "Tasks:"
    compgen -A function | sed 's/^/\t/'
}

function default {
   build
}


TIMEFORMAT=$'\n✅ Task completed in %3lR'
time "${@:-default}"