From eb182cce0b0d6b80c601a09cb327c7430327e89a Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 23 Oct 2023 18:05:09 +0300 Subject: [PATCH] Adding composer_update task which will eventually replace deps_update and a package responsible for it --- composer.inc.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/composer.inc.php b/composer.inc.php index 1c2f46d..d82ca71 100644 --- a/composer.inc.php +++ b/composer.inc.php @@ -2,6 +2,11 @@ namespace taskman; use Exception; +task('composer_update', function() +{ + composer_update(true); +}); + task('composer', function($args) { global $GAME_ROOT; @@ -151,7 +156,6 @@ task('composer_vendor_status', function(array $args) { }); - function composer_try_update_lock_entry($package, $rev, $new_tag) { global $GAME_ROOT; @@ -194,3 +198,12 @@ function composer_try_update_lock_entry($package, $rev, $new_tag) return $changed; } +//NOTE: COMPOSER_FORCE_UPDATE = true will make composer to update packages and +// a lock file +// COMPOSER_FORCE_UPDATE = false will make composer install dependencies +// listed in a lock file in case if it's present +function composer_update($COMPOSER_FORCE_UPDATE = false) +{ + global $GAME_ROOT; + include("$GAME_ROOT/composer/update.php"); +}