cleanup makefile a bit
This commit is contained in:
15
Makefile
15
Makefile
@@ -11,17 +11,26 @@ all: build
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
@composer install --no-interaction
|
@composer install --no-interaction
|
||||||
@php artisan config:cache
|
@php artisan route:clear
|
||||||
|
@php artisan config:clear
|
||||||
|
@composer dump-autoload
|
||||||
|
|
||||||
.PHONY: db
|
.PHONY: db
|
||||||
db:
|
db:
|
||||||
@php artisan database:create --reset
|
@php artisan database:create
|
||||||
@php artisan migrate:refresh --seed
|
@php artisan migrate:refresh --seed
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: build db
|
install: build db
|
||||||
@echo "Done!"
|
@echo "Done!"
|
||||||
|
|
||||||
|
.PHONY: update
|
||||||
|
update: db
|
||||||
|
|
||||||
|
@php artisan route:clear
|
||||||
|
@php artisan config:clear
|
||||||
|
@echo "Done!"
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@find bootstrap/cache -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
@find bootstrap/cache -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
||||||
@@ -31,12 +40,12 @@ clean:
|
|||||||
@find storage/framework/sessions -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
@find storage/framework/sessions -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
||||||
@find storage/framework/views -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
@find storage/framework/views -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
||||||
@find storage/logs -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
@find storage/logs -type f -not -name '.gitignore' -print0 | xargs -0 rm --
|
||||||
@composer dump-autoload
|
|
||||||
@php artisan route:clear
|
@php artisan route:clear
|
||||||
@php artisan config:clear
|
@php artisan config:clear
|
||||||
|
|
||||||
.PHONY: reset
|
.PHONY: reset
|
||||||
reset: clean
|
reset: clean
|
||||||
|
@php artisan database:create --reset
|
||||||
@make install
|
@make install
|
||||||
|
|
||||||
.PHONY: unittest-db
|
.PHONY: unittest-db
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ class CreateDatabase extends Command
|
|||||||
$this->runCommand($cmd);
|
$this->runCommand($cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!file_exists(config($dbkey . 'database'))) {
|
||||||
$cmd = [
|
$cmd = [
|
||||||
$exec,
|
$exec,
|
||||||
config($dbkey . 'database'),
|
config($dbkey . 'database'),
|
||||||
@@ -100,6 +101,7 @@ class CreateDatabase extends Command
|
|||||||
|
|
||||||
$this->runCommand($cmd);
|
$this->runCommand($cmd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
@@ -121,9 +123,7 @@ class CreateDatabase extends Command
|
|||||||
|
|
||||||
if (config($dbkey . 'driver') === 'mysql') {
|
if (config($dbkey . 'driver') === 'mysql') {
|
||||||
$this->create_mysql($dbkey);
|
$this->create_mysql($dbkey);
|
||||||
}
|
} elseif (config($dbkey . 'driver') === 'sqlite') {
|
||||||
|
|
||||||
elseif (config($dbkey . 'driver') === 'sqlite') {
|
|
||||||
$this->create_sqlite($dbkey);
|
$this->create_sqlite($dbkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user