@@ -5,7 +5,13 @@ composer:
55 composer install --prefer-dist --no-dev
66 php artisan vendor:publish --tag=log-viewer-asset
77
8- dist-gen : clean composer
8+ npm-build :
9+ rm -r public/build 2> /dev/null || true
10+ rm -r node_modules 2> /dev/null || true
11+ npm install
12+ npm run build
13+
14+ dist-gen : clean composer npm-build
915 @echo " packaging..."
1016 @mkdir Lychee
1117 @mkdir Lychee/public
@@ -19,6 +25,7 @@ dist-gen: clean composer
1925 @cp -r config Lychee
2026 @cp -r composer-cache Lychee
2127 @cp -r database Lychee
28+ @cp -r public/build Lychee/public
2229 @cp -r public/dist Lychee/public
2330 @cp -r public/vendor Lychee/public
2431 @cp -r public/installer Lychee/public
@@ -46,6 +53,7 @@ dist-gen: clean composer
4653 @cp -r version.md Lychee
4754 @touch Lychee/storage/logs/laravel.log
4855 @touch Lychee/public/dist/user.css
56+ @touch Lychee/public/dist/custom.js
4957 @touch Lychee/public/uploads/import/index.html
5058 @touch Lychee/public/sym/index.html
5159
@@ -63,6 +71,12 @@ dist: dist-clean
6371clean :
6472 @rm build/* 2> /dev/null || true
6573 @rm -r Lychee 2> /dev/null || true
74+ @rm -r public/build 2> /dev/null || true
75+ @rm -r node_modules 2> /dev/null || true
76+ @rm -r vendor 2> /dev/null || true
77+
78+ install : composer npm-build
79+ php artisan migrate
6680
6781test :
6882 @if [ -x " vendor/bin/phpunit" ]; then \
@@ -90,6 +104,7 @@ formatting:
90104phpstan :
91105 vendor/bin/phpstan analyze
92106
107+ # Generating new versions
93108gen_minor :
94109 php scripts/gen_release.php
95110 git add database
@@ -106,6 +121,8 @@ gen_major:
106121release_major : gen_major
107122 git commit -m " bump to version $( shell cat version.md) "
108123
124+ # Building tests 1 by 1
125+
109126TESTS_PHP := $(shell find tests/Feature -name "* Test.php" -printf "% f\n")
110127TEST_DONE := $(addprefix build/,$(TESTS_PHP:.php=.done ) )
111128
0 commit comments