Adding convenience shell wrappers and tweaking composer post update cmd

This commit is contained in:
Pavel Shevaev 2024-09-23 19:05:41 +03:00
parent 85d6434afe
commit 717651edbe
2 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,9 @@
"post-install-cmd": [ "post-install-cmd": [
"taskman\\DotnetSupport::install" "taskman\\DotnetSupport::install"
], ],
"post-update-cmd": [
"taskman\\DotnetSupport::install"
],
"autoload": { "autoload": {
"classmap": ["dotnet.inc.php"] "classmap": ["dotnet.inc.php"]
} }

View File

@ -17,6 +17,16 @@ task('dotnet_install', function() {
DotnetSupport::install(); DotnetSupport::install();
}); });
function dotnet_shell($cmd)
{
shell('dotnet ' . $cmd);
}
function dotnet_shell_get($cmd)
{
return shell_get('dotnet ' . $cmd);
}
function dotnet_install(string $version) function dotnet_install(string $version)
{ {
$has_dotnet = true; $has_dotnet = true;