-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
executable file
·70 lines (54 loc) · 1.49 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
############################## DEV_SCRIPT_MARKER ##############################
# This script is used to document and run recurring tasks in development. #
# #
# You can run your tasks using the script `./dev some-task`. #
# You can install the Sandstorm Dev Script Runner and run your tasks from any #
# nested folder using `dev some-task`. #
# https://github.com/sandstorm/Sandstorm.DevScriptRunner #
###############################################################################
set -e
##### TASKS #####
function setup(){
composer install
npm install
vendor/bin/sail build
dev linkStorage
}
function start(){
vendor/bin/sail up -d
}
function seed(){
vendor/bin/sail artisan db:seed --class=DatabaseSeeder
}
function seedDev(){
vendor/bin/sail artisan db:seed --class=DevelopmentSeeder
}
function migrate(){
vendor/bin/sail artisan migrate
}
function stop(){
vendor/bin/sail stop
}
function down(){
vendor/bin/sail down
}
function test() {
vendor/bin/sail artisan test $1 $2 $3 $4
}
function linkStorage() {
vendor/bin/sail artisan storage:link
}
function restart(){
dev down
dev start
}
function resetDB() {
vendor/bin/sail artisan db:wipe
dev migrate
dev seed
dev seedDev
}
# THIS NEEDS TO BE LAST!!!
# this will run your tasks
"$@"