Ues a local installl of composer to protect against old versions

This commit is contained in:
Starbeamrainbowlabs 2019-03-30 11:59:21 +00:00
parent 109a8f8fd3
commit 2d94af6913
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 17 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.backup *.backup
.cache/
app/ app/
data/ data/
__nightdocs/ __nightdocs/

19
build
View File

@ -23,6 +23,7 @@ lantern_path="./lantern-build-engine";
# Put any custom settings here. # Put any custom settings here.
# Client-side build output # Client-side build output
cache_dir="./.cache";
build_output_folder="./app"; build_output_folder="./app";
# Database settings for ssh port forwarding task # Database settings for ssh port forwarding task
@ -71,6 +72,17 @@ fi
# ██ ██ ██ ██ ██ ██ # ██ ██ ██ ██ ██ ██
# ███████ ███████ ██ ██████ ██ # ███████ ███████ ██ ██████ ██
task_download-composer() {
if [ -f "${cache_dir}/composer" ]; then
return 0;
fi
task_begin "Downloading composer";
curl "https://getcomposer.org/composer.phar" -o "${cache_dir}/composer"; exit_code=$?;
chmod +x "${cache_dir}/composer";
task_end ${exit_code};
}
task_setup() { task_setup() {
stage_begin "Setting up"; stage_begin "Setting up";
@ -78,7 +90,6 @@ task_setup() {
check_command git true; check_command git true;
check_command php true; check_command php true;
check_command node true; check_command node true;
check_command composer true;
check_command npm true; check_command npm true;
if [ ! -w "${PWD}" ]; then if [ ! -w "${PWD}" ]; then
@ -100,8 +111,10 @@ task_setup() {
npm install --production; npm install --production;
task_end $?; task_end $?;
tasks_run download-composer;
task_begin "Installing server dependencies"; task_begin "Installing server dependencies";
composer install --no-dev; "${cache_dir}/composer" install --no-dev;
task_end $?; task_end $?;
if [ ! -d "./data" ]; then if [ ! -d "./data" ]; then
@ -131,7 +144,7 @@ task_setup-dev() {
task_end $?; task_end $?;
task_begin "Installing server development dependencies"; task_begin "Installing server development dependencies";
composer install; "${cache_dir}/composer" install;
task_end $?; task_end $?;
} }