forked from laracasts/Gilded-Rose-Kata-in-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
executable file
·54 lines (36 loc) · 1.5 KB
/
dev.sh
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
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/bash
if [ $# -gt 0 ]; then
if [ "$1" == "start" ]; then
docker-compose up -d;
elif [ "$1" == "stop" ]; then
docker-compose down;
elif [ "$1" == "rebuild" ]; then
docker-compose down;
docker-compose build;
docker-compose up -d;
elif [ "$1" == "bash" ]; then
docker-compose exec app bash "$@";
elif [ "$1" == "artisan" ]; then
docker-compose exec app php artisan "$@";
elif [ "$1" == "ide-regen" ]; then
docker-compose exec app bash -c "php artisan clear-compiled && php artisan ide-helper:generate";
elif [ "$1" == "composer" ]; then
docker-compose exec app composer "$@";
elif [ "$1" == "laravel" ]; then
docker-compose exec app bash -c "\$HOME/.composer/vendor/bin/laravel \"$@\"";
elif [ "$1" == "phpunit" ]; then
docker-compose exec app ./vendor/bin/phpunit "$@";
elif [ "$1" == "npm" ]; then
docker-compose run --rm node npm "$@";
elif [ "$1" == "yarn" ]; then
docker-compose run --rm node yarn "$@";
elif [ "$1" == "gulp" ]; then
docker-compose run --rm node ./node_modules/.bin/gulp "$@";
elif [ "$1" == "tailwind" ]; then
docker-compose run --rm node ./node_modules/.bin/tailwind "$@";
else
docker-compose "$@"
fi;
else
docker-compose ps;
fi;