create makefile

This commit is contained in:
osaajani 2020-02-18 02:51:45 +01:00
parent 2519df2c2a
commit 6a0e214cc3
2 changed files with 33 additions and 9 deletions

33
Makefile Normal file
View File

@ -0,0 +1,33 @@
.PHONY: all install composer_install move_dir migrate
INSTALL_DIR=$(DESTDIR)/opt/raspisms2
ENV=prod
all: install
vendor: composer.phar composer.json
./composer.phar self-update
./composer.phar validate
./composer.phar install
migrate: vendor
vendor/bin/phinx migrate --environment=$(ENV)
move_dir:
mv . $(INSTALL_DIR)
cd $(INSTALL_DIR)
install: move_dir vendor migrate
clean:
rm -rf vendor/
uninstall:
rm -rf .

View File

@ -1,9 +0,0 @@
<?php
$env = [
//Database access
'DATABASE_HOST' => 'localhost',
'DATABASE_NAME' => 'raspisms',
'DATABASE_USER' => 'root',
'DATABASE_PASSWORD' => 'root',
];