adds do.sh with tasks
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good
This commit is contained in:
parent
e5584392e1
commit
198610ab7c
23
do.sh
Normal file
23
do.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Do - The Simplest Build Tool on Earth.
|
||||||
|
# Documentation and examples see https://github.com/8gears/do
|
||||||
|
|
||||||
|
set -Eeuo pipefail # -e "Automatic exit from bash shell script on error" -u "Treat unset variables and parameters as errors"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
echo "I am ${FUNCNAME[0]}ing"
|
||||||
|
poetry build
|
||||||
|
}
|
||||||
|
|
||||||
|
test() {
|
||||||
|
poetry run flake8
|
||||||
|
poetry run pytest tests --cov pysuperconductor
|
||||||
|
}
|
||||||
|
|
||||||
|
all() {
|
||||||
|
build && test
|
||||||
|
}
|
||||||
|
|
||||||
|
"$@" # <- execute the task
|
||||||
|
|
||||||
|
[ "$#" -gt 0 ] || printf "Usage:\n\t./do.sh %s\n" "($(compgen -A function | grep '^[^_]' | paste -sd '|' -))"
|
Loading…
x
Reference in New Issue
Block a user