Simplifying composer update logic
This commit is contained in:
parent
0c652e80cf
commit
4abd925a9a
13
deps.inc.php
13
deps.inc.php
|
@ -1,17 +1,6 @@
|
|||
<?php
|
||||
namespace taskman;
|
||||
|
||||
task('try_deps_update', ['always' => true], function()
|
||||
{
|
||||
global $GAME_ROOT;
|
||||
|
||||
if(try_update_composer())
|
||||
echo "Composer was updated...\n";
|
||||
|
||||
if(file_exists("$GAME_ROOT/composer/vendor/composer/autoload_real.php"))
|
||||
include_once("$GAME_ROOT/composer/vendor/autoload.php");
|
||||
});
|
||||
|
||||
task('deps_update', function()
|
||||
{
|
||||
update_composer();
|
||||
|
@ -21,6 +10,7 @@ function update_composer()
|
|||
{
|
||||
global $GAME_ROOT;
|
||||
include("$GAME_ROOT/composer/update.php");
|
||||
touch("$GAME_ROOT/composer/composer.last");
|
||||
}
|
||||
|
||||
function try_update_composer()
|
||||
|
@ -31,6 +21,5 @@ function try_update_composer()
|
|||
return false;
|
||||
|
||||
update_composer();
|
||||
touch("$GAME_ROOT/composer/composer.last");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue