2017-06-08 07:43:25 +08:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# Create the phpvms database if needed:
|
|
|
|
# docker exec phpvms /usr/bin/mysql -uroot -e 'CREATE DATABASE phpvms'
|
2017-12-14 07:03:59 +08:00
|
|
|
SHELL := /bin/bash
|
2018-01-07 08:20:37 +08:00
|
|
|
COMPOSER ?= $(shell which composer)
|
2017-06-08 07:43:25 +08:00
|
|
|
|
2017-12-14 07:03:59 +08:00
|
|
|
PKG_NAME := "/tmp"
|
2017-06-08 07:43:25 +08:00
|
|
|
CURR_PATH=$(shell pwd)
|
|
|
|
|
2017-07-04 14:17:41 +08:00
|
|
|
.PHONY: all
|
2017-12-08 04:27:57 +08:00
|
|
|
all: install
|
2017-06-08 07:43:25 +08:00
|
|
|
|
2017-12-08 04:27:57 +08:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2018-01-05 04:48:06 +08:00
|
|
|
@php artisan cache:clear
|
|
|
|
@php artisan route:clear
|
|
|
|
@php artisan config:clear
|
|
|
|
@php artisan view:clear
|
2018-01-05 04:58:01 +08:00
|
|
|
@find bootstrap/cache -type f -not -name '.gitignore' -print0 | xargs -0 rm -rf
|
2018-01-05 05:17:55 +08:00
|
|
|
|
2019-11-27 22:19:20 +08:00
|
|
|
@find storage/framework/cache/ -mindepth 1 -type f -not -name '.gitignore' -print0 | xargs -0 rm -rf
|
2018-01-05 05:22:32 +08:00
|
|
|
@find storage/framework/sessions/ -mindepth 1 -type f -not -name '.gitignore' -print0 | xargs -0 rm -rf
|
|
|
|
@find storage/framework/views/ -mindepth 1 -not -name '.gitignore' -print0 | xargs -0 rm -rf
|
2018-01-05 05:17:55 +08:00
|
|
|
|
2018-01-05 05:22:32 +08:00
|
|
|
@find storage/logs -mindepth 1 -not -name '.gitignore' -print0 | xargs -0 rm -rf
|
2017-06-09 02:28:26 +08:00
|
|
|
|
2017-12-12 21:25:11 +08:00
|
|
|
.PHONY: clean-routes
|
|
|
|
clean-routes:
|
|
|
|
@php artisan route:clear
|
|
|
|
|
2019-07-18 22:51:05 +08:00
|
|
|
.PHONY: clear
|
|
|
|
clear:
|
|
|
|
@php artisan cache:clear
|
|
|
|
@php artisan config:clear
|
|
|
|
@php artisan route:clear
|
|
|
|
@php artisan view:clear
|
|
|
|
|
2017-12-08 04:27:57 +08:00
|
|
|
.PHONY: build
|
|
|
|
build:
|
2018-01-07 08:19:05 +08:00
|
|
|
@php $(COMPOSER) install --no-interaction
|
2017-12-07 01:22:04 +08:00
|
|
|
|
2017-12-17 05:12:44 +08:00
|
|
|
# This is to build all the stylesheets, etc
|
|
|
|
.PHONY: build-assets
|
|
|
|
build-assets:
|
2020-09-05 01:28:17 +08:00
|
|
|
npm run production
|
2017-12-17 05:12:44 +08:00
|
|
|
|
2017-07-04 14:17:41 +08:00
|
|
|
.PHONY: install
|
2017-12-08 04:27:57 +08:00
|
|
|
install: build
|
|
|
|
@php artisan database:create
|
|
|
|
@php artisan migrate --seed
|
2017-12-07 01:22:04 +08:00
|
|
|
@echo "Done!"
|
2017-06-09 09:02:52 +08:00
|
|
|
|
2017-12-07 07:31:20 +08:00
|
|
|
.PHONY: update
|
2017-12-08 07:22:15 +08:00
|
|
|
update: build
|
2018-01-07 08:19:05 +08:00
|
|
|
@php $(COMPOSER) dump-autoload
|
|
|
|
@php $(COMPOSER) update --no-interaction
|
2017-12-15 11:59:54 +08:00
|
|
|
@php artisan migrate --force
|
2017-12-07 07:31:20 +08:00
|
|
|
@echo "Done!"
|
|
|
|
|
2017-07-04 14:17:41 +08:00
|
|
|
.PHONY: reset
|
2019-05-11 07:40:07 +08:00
|
|
|
reset: clean
|
2018-01-07 08:19:05 +08:00
|
|
|
@php $(COMPOSER) dump-autoload
|
2017-12-20 05:19:06 +08:00
|
|
|
@make reload-db
|
|
|
|
|
|
|
|
.PHONY: reload-db
|
|
|
|
reload-db:
|
2019-10-30 21:05:18 +08:00
|
|
|
@php artisan database:create --reset
|
|
|
|
@php artisan migrate --seed
|
|
|
|
@echo "Done!"
|
2019-08-10 01:57:56 +08:00
|
|
|
@make clean
|
2017-06-09 09:02:52 +08:00
|
|
|
|
2017-07-05 02:09:44 +08:00
|
|
|
.PHONY: tests
|
2017-06-09 12:05:22 +08:00
|
|
|
tests: test
|
|
|
|
|
2017-07-04 14:17:41 +08:00
|
|
|
.PHONY: test
|
2020-05-23 23:43:29 +08:00
|
|
|
test:
|
|
|
|
@#php artisan database:create --reset
|
2020-05-24 00:51:12 +08:00
|
|
|
@vendor/bin/phpunit --verbose
|
2017-06-09 12:00:30 +08:00
|
|
|
|
2019-05-13 01:08:31 +08:00
|
|
|
.PHONY: phpcs
|
|
|
|
phpcs:
|
2022-03-14 23:45:18 +08:00
|
|
|
@PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --dry-run --diff --using-cache=no
|
2019-05-13 01:08:31 +08:00
|
|
|
|
2017-12-26 09:23:58 +08:00
|
|
|
.PHONY: replay-acars
|
|
|
|
replay-acars:
|
2018-01-02 06:01:01 +08:00
|
|
|
#@php artisan phpvms:replay AAL10,AAL3113,BAW172,DAL988,FIN6,MSR986 --manual
|
|
|
|
@php artisan phpvms:replay ASH6028 --manual
|
2017-12-26 09:23:58 +08:00
|
|
|
|
2017-08-22 02:06:10 +08:00
|
|
|
.PHONY: sass-watch
|
2017-08-19 01:02:32 +08:00
|
|
|
sass-watch:
|
|
|
|
sass --watch public/assets/admin/sass/paper-dashboard.scss:public/assets/admin/css/paper-dashboard.css
|
|
|
|
|
2017-12-14 06:04:23 +08:00
|
|
|
.PHONY: deploy-package
|
|
|
|
deploy-package:
|
2017-12-14 07:10:43 +08:00
|
|
|
./.travis/deploy_script.sh
|
2017-12-14 06:04:23 +08:00
|
|
|
|
2017-12-15 11:34:11 +08:00
|
|
|
.PHONY: reset-installer
|
|
|
|
reset-installer:
|
2018-01-01 02:09:23 +08:00
|
|
|
@php artisan database:create --reset
|
|
|
|
@php artisan migrate:refresh --seed
|
2017-12-15 11:34:11 +08:00
|
|
|
|
2021-05-26 03:07:04 +08:00
|
|
|
.PHONY: docker-test
|
|
|
|
docker-test:
|
2022-08-15 21:43:50 +08:00
|
|
|
@docker compose -f docker-compose.dev.yml up
|
2017-06-08 07:43:25 +08:00
|
|
|
|
2017-07-04 14:17:41 +08:00
|
|
|
.PHONY: docker-clean
|
2017-06-08 07:43:25 +08:00
|
|
|
docker-clean:
|
|
|
|
-docker stop phpvms
|
|
|
|
-docker rm -rf phpvms
|
|
|
|
-rm core/local.config.php
|
|
|
|
-rm -rf tmp/mysql
|