-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·43 lines (39 loc) · 1.25 KB
/
Copy pathmake.sh
File metadata and controls
executable file
·43 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Author: Bruno Braga <brunobraga@protonmail.com>
#
# Streamlines most used commands of the project
folders=(register router sapi/app app)
case "$1" in
add-test)
docker compose exec php bin/console make:test $@
;;
setup-test)
docker compose exec php bin/console doctrine:database:drop --env=test --force
docker compose exec php bin/console doctrine:database:create --env=test
docker compose exec php bin/console doctrine:migrations:migrate --env=test --no-interaction
;;
test)
docker compose exec php ./vendor/bin/phpunit --testdox
;;
console)
docker compose exec php bin/console $@
;;
migrate)
docker compose exec php bin/console doctrine:migrations:migrate
;;
seed)
docker compose exec php bin/console doctrine:fixtures:load
;;
run-model)
for i in "${folders[@]}"; do
if [ ! -f "${i}/.env" ]; then
echo "missing .env at /$i folder";
fi
done
docker compose exec "$2" /bin/bash -c "python3 /multiagent_models/netlogo/main.py"
;;
*)
echo "Usage: $0 {setup-test|test|console|migrate|seed|run-model} <service>"
exit 1
;;
esac