2024-09-23 18:27:20 +03:00
|
|
|
<?php
|
|
|
|
namespace taskman;
|
2024-09-23 19:36:59 +03:00
|
|
|
use Exception;
|
2024-09-23 18:27:20 +03:00
|
|
|
|
2024-09-23 19:02:14 +03:00
|
|
|
task('dotnet_set_env', ['always' => true], function() {
|
|
|
|
dotnet_set_env();
|
2024-09-23 18:27:20 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
task('dotnet_install', function() {
|
|
|
|
DotnetSupport::install();
|
|
|
|
});
|
|
|
|
|
2024-09-23 19:05:41 +03:00
|
|
|
function dotnet_shell($cmd)
|
|
|
|
{
|
|
|
|
shell('dotnet ' . $cmd);
|
|
|
|
}
|
|
|
|
|
|
|
|
function dotnet_shell_get($cmd)
|
|
|
|
{
|
|
|
|
return shell_get('dotnet ' . $cmd);
|
|
|
|
}
|
|
|
|
|
2024-09-23 19:02:14 +03:00
|
|
|
function dotnet_set_env()
|
2024-09-23 18:27:20 +03:00
|
|
|
{
|
2024-11-20 09:25:46 +03:00
|
|
|
//TODO: do we need this one?
|
2024-09-23 19:02:14 +03:00
|
|
|
putenv("DOTNET_CLI_TELEMETRY_OPTOUT=1");
|
|
|
|
|
2024-11-20 09:25:46 +03:00
|
|
|
DotnetSupport::addEnvPath();
|
2024-09-23 18:27:20 +03:00
|
|
|
}
|