Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master setup: fix composer lock file handling #355

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions setup/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ then
fi
doil_status_okay

doil_status_send_message "Delete potential composer lock file"
doil_system_delete_potential_composer_lock
doil_status_okay

if [[ -z ${GHRUN} ]]
then
# start salt server
Expand Down
9 changes: 8 additions & 1 deletion setup/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,17 @@ function doil_system_setup_log() {
touch /var/log/doil/stream.log
fi
}
function doil_system_delete_potential_composer_lock() {
if [ -f /usr/local/lib/doil/app/composer.lock ]
then
rm -rf /usr/local/lib/doil/app/composer.lock
fi
return 0
}

function doil_system_build_php_image() {
(docker build -q -t doil_php:stable /usr/local/lib/doil/server/php) 2>&1 > /var/log/doil/stream.log
docker run --rm -ti -v /home:/home -v /usr/local/lib/doil:/usr/local/lib/doil -e PHP_INI_SCAN_DIR=/srv/php/mods-available -w /usr/local/lib/doil/app --user $(id -u):$(id -g) doil_php:stable /usr/bin/php7.4 -c /srv/php/php.ini /usr/local/bin/composer -q -n install
docker run --rm -ti -v /home:/home -v /usr/local/lib/doil:/usr/local/lib/doil -e PHP_INI_SCAN_DIR=/srv/php/mods-available -w /usr/local/lib/doil/app --user $(id -u):$(id -g) doil_php:stable /usr/local/bin/composer -q -n install
}

function doil_system_install_saltserver() {
Expand Down
4 changes: 4 additions & 0 deletions setup/updates/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ update() {
doil_system_copy_doil
doil_status_okay

doil_status_send_message "Delete potential composer lock file"
doil_system_delete_potential_composer_lock
doil_status_okay

doil_status_send_message "Building doil php image"
doil_system_build_php_image
if [[ $? -ne 0 ]]
Expand Down