-
Notifications
You must be signed in to change notification settings - Fork 108
/
Makefile
81 lines (54 loc) · 1.55 KB
/
Makefile
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
70
71
72
73
74
75
76
77
78
79
80
81
.PHONY: all build build-prod deps deps-php clean distclean db-reset db-migrate test test-php queue-listen watch
all: deps build
build:
./node_modules/.bin/gulp
build-prod:
./node_modules/.bin/gulp --production
deps: deps-node deps-php
deps-production: deps-node deps-php
deps-node:
npm install
deps-php:
composer install
set-key:
php artisan key:generate
TEST_ARG ?= ''
test: test-php test-browser
test-php: db-test-setup
./vendor/bin/phpunit $(TEST_ARG)
test-browser: db-test-setup
APP_ENV=testing ./artisan dusk $(TEST_ARG)
clean:
rm -rf public/build public/css public/js
@-php artisan cache:clear
@-php artisan view:clear
@-php artisan config:clear
@-php artisan route:clear
distclean: clean
rm -rf node_modules vendor/*
db-reset:
php artisan db:rebuild && php artisan migrate && php artisan db:seed
db-test-setup:
php artisan db:rebuild --env=testing && php artisan migrate --env=testing
db-test-seed:
php artisan db:seed --env=testing
db-migrate:
php artisan migrate
db-force-seed:
php artisan db:seed --force
db-force-migrate:
echo "Running a forced database migration, potential to lose some data!"
php artisan migrate --force
db-backup:
php artisan db:backup
db-restore:
@if [ -z "$(file)" ]; then echo "Must provide a 'file' option." && exit 1; fi
php artisan db:restore $(file)
deploy-forge: distclean deps-production db-force-migrate
queue-listen:
php artisan queue:listen
watch:
./node_modules/.bin/gulp watch
envoyer-post-composer: clean deps-node build-prod
php artisan config:cache
envoyer-post-activate: db-force-migrate