mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Robo task for CS fixes
This commit is contained in:
parent
793af17c22
commit
67ecaee1f6
3 changed files with 17 additions and 1 deletions
|
@ -128,4 +128,13 @@ class RoboFile extends \Robo\Tasks {
|
||||||
$this->_exec("git worktree prune");
|
$this->_exec("git worktree prune");
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function clean($opts = ['demo|d' => false]): Result {
|
||||||
|
$t = $this->taskExec(realpath(self::BASE."vendor/bin/php-cs-fixer"));
|
||||||
|
$t->arg("fix");
|
||||||
|
if ($opts['demo']) {
|
||||||
|
$t->args("--dry-run", "--diff")->option("--diff-format", "udiff");
|
||||||
|
}
|
||||||
|
return $t->run();
|
||||||
|
}
|
||||||
}
|
}
|
4
robo
4
robo
|
@ -3,4 +3,8 @@ base=`dirname "$0"`
|
||||||
roboCommand="$1"
|
roboCommand="$1"
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
if [ "$1" == "clean" ]; then
|
||||||
|
"$base/vendor/bin/robo" "$roboCommand" $*
|
||||||
|
else
|
||||||
"$base/vendor/bin/robo" "$roboCommand" -- $*
|
"$base/vendor/bin/robo" "$roboCommand" -- $*
|
||||||
|
fi
|
3
robo.bat
3
robo.bat
|
@ -14,4 +14,7 @@ if "%~1" neq "" (
|
||||||
)
|
)
|
||||||
if defined args set args=%args:~1%
|
if defined args set args=%args:~1%
|
||||||
|
|
||||||
|
if not "%1"=="clean" (
|
||||||
|
call "%base%vendor\bin\robo" "%roboCommand%" %args%
|
||||||
|
)
|
||||||
call "%base%vendor\bin\robo" "%roboCommand%" -- %args%
|
call "%base%vendor\bin\robo" "%roboCommand%" -- %args%
|
Loading…
Reference in a new issue