-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
55 lines (41 loc) · 1.23 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
DOCROOT = htdocs/
DEV_SERVER_PORT = 8080
DEV_SERVER_LISTEN_IP = 127.0.0.1
PHP_PATH = php
# 開発環境準備系(主にローカル開発用)
dev-setup: composer.phar composer-install local-reset config.php htdocs/.htaccess
config.php:
cp config.php.sample config.php
htdocs/.htaccess:
cp htdocs/.htaccess.sample htdocs/.htaccess
composer.phar:
curl -sSfL -o composer-setup.php https://getcomposer.org/installer
$(PHP_PATH) composer-setup.php --filename=composer.phar
rm composer-setup.php
.PHONY: composer-install
composer-install: composer.phar
$(PHP_PATH) composer.phar install
.PHONY: local-reset
local-reset:
-rm sqlite.db
cat schema.sqlite3.sql | sqlite3 sqlite.db
.PHONY: composer-dump-autoload-opt
composer-dump-autoload-opt:
composer dump-autoload --optimize --no-dev
.PHONY: test
test:
vendor/bin/phpunit
# for built in web server
# # ビルトインウェブサーバーの起動
.PHONY: start
start:
$(PHP_PATH) -S $(DEV_SERVER_LISTEN_IP):$(DEV_SERVER_PORT) -t $(DOCROOT)
# uzulla作業用、全てが消えるので危険です。
.PHONY: uzulla-local-reset-all
uzulla-local-reset-all: local-reset
find . | grep .DS_Store |xargs rm
-rm composer.phar
-rm sqlite.db
-rm config.php
-rm -r vendor/
git status --ignored