-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (49 loc) · 1.05 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
# Tạo file env nếu chưa có
ifeq ($(wildcard .env),)
cp .env.example .env
endif
# Tải cấu hình env
ifneq ($(wildcard .env),)
include .env
endif
COMPOSER_OPTIONS_INSTALL?=
ifneq ($(APP_ENV), local)
COMPOSER_OPTIONS_INSTALL=--no-dev
endif
# Cấu hình project nhanh
.PHONY: setup
setup:
# install dependencies with $(APP_ENV)
composer install $(COMPOSER_OPTIONS_INSTALL)
ifeq ($(FILESYSTEM_DISK), local)
php artisan storage:link --force
endif
ifeq ($(APP_KEY),)
php artisan key:generate
endif
php artisan migrate --force
# Kiểm tra các file xem đã đúng format chưa
.PHONNY: check
check:
./vendor/bin/pint --test -v
# Format code
.PHONNY: fix
fix:
./vendor/bin/pint -v
# Chạy nhanh test
.PHONY: test
test:
php artisan test
.PHONY: migrate
migrate:
php artisan migrate --force
.PHONY: seed
seed:
php artisan db:seed --force
.PHONY: phpstan
phpstan:
./vendor/bin/phpstan analyse
.PHONY: s3
s3:
# https://laravel.com/docs/11.x/filesystem#driver-prerequisites
composer require league/flysystem-aws-s3-v3 league/flysystem-path-prefixing