From 2cc6dae273a1d5a41475e9de2444b8c5df514c7f Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 13 Feb 2024 12:19:07 +0300 Subject: [PATCH] Optionaly running 'composer update ' in case composer.lock entry wasn't update after composer_vendor_push --- composer.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.inc.php b/composer.inc.php index 54f8e15..08d588c 100644 --- a/composer.inc.php +++ b/composer.inc.php @@ -111,7 +111,13 @@ task('composer_vendor_push', function($args) { git_do($repo, 'push --tags'); git_do($repo, 'rev-parse HEAD', $output); - composer_try_update_lock_entry($relpath, trim($output[0]), $new_tag); + if(composer_try_update_lock_entry($relpath, trim($output[0]), $new_tag)) + return; + + echo "composer.lock file was not updated, run 'composer update $relpath'?\n"; + are_you_sure(); + + composer_run(['update', $relpath]); }); task('composer_vendor_status', function(array $args) {