Adding composer_update task which will eventually replace deps_update and a package responsible for it

This commit is contained in:
Pavel Shevaev 2023-10-23 18:05:09 +03:00
parent 9bbb133e2a
commit eb182cce0b
1 changed files with 14 additions and 1 deletions

View File

@ -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");
}