Skip to content

Commit

Permalink
Moving to a single file for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jesuejunior committed May 4, 2021
1 parent df87610 commit 22b990b
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 50 deletions.
55 changes: 55 additions & 0 deletions Taskfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

function test {
if [ `uname` = "Darwin" ]
then
echo "installing dependncies for MacOS"
# check if has brew
brew install redis-cli
else
echo "installing dependencies for Debian like"
apt-get install redis-server
fi

echo "Configuring user in redis to test"
redis-cli SET "ADMIN" "xyz"

echo "running test"
py.test -s -v --cov=./ --cov-report term-missing -v
}


function install {
echo "install task not implemented"
}

function build {
echo "build task not implemented"
}


function start {
rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info ./out ./*/out ./.mypy_cache ./*/.mypy_cache */.pytest_cache .pytest_cache .serverless/*
echo "starting ..."

docker-compose -f platform/docker/docker-compose.yml up
uvicorn brandenburg.main:app --log-level trace --reload

}

function stop {
docker-compose -f platform/docker/docker-compose.yml down
}

function default {
start
}

function help {
echo "$0 <task> <args>"
echo "Tasks:"
echo "$0 start -> Para iniciar o ..."
}

TIMEFORMAT="Task completed in %3lR"
time ${@:-default}
Empty file removed scripts/README.md
Empty file.
10 changes: 0 additions & 10 deletions scripts/bootstrap

This file was deleted.

1 change: 0 additions & 1 deletion scripts/console

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/server

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/setup

This file was deleted.

18 changes: 0 additions & 18 deletions scripts/test

This file was deleted.

0 comments on commit 22b990b

Please sign in to comment.