Skip to content

Commit fa4b4ad

Browse files
committed
rename method
1 parent 3eff5ed commit fa4b4ad

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/Command/SelfUpdateCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ class SelfUpdateCommand
3030
*
3131
* @CommandMapping(alias="selfupdate, update-self, updateself")
3232
* @CommandOption(
33-
* "only-check", type="bool",
33+
* "check", type="bool",
3434
* desc="only fetch latest release information, but dont download and update package",
3535
* )
3636
* @param Input $input
3737
* @param Output $output
3838
*/
39-
public function up(Input $input, Output $output): void
39+
public function down(Input $input, Output $output): void
4040
{
4141
$output->colored('Current Version: ' . SwoftCLI::VERSION);
4242

@@ -45,7 +45,7 @@ public function up(Input $input, Output $output): void
4545

4646
// $jsonText = file_get_contents(self::LATEST_RELEASE_URL);
4747

48-
$output->colored('Fetch latest release information for Github ...', 'cyan');
48+
$output->colored('> Fetch latest release information for Github ...', 'cyan');
4949

5050
$result = $this->fetchInfo();
5151
$latest = json_decode($result, true);
@@ -63,7 +63,7 @@ public function up(Input $input, Output $output): void
6363
];
6464

6565
Show::aList($metaInfo, 'latest release information');
66-
if ($input->getOpt('only-check')) {
66+
if ($input->getOpt('check')) {
6767
return;
6868
}
6969

app/bean.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
'idAliases' => [
1515
// 'run' => 'serve:run'
1616
'ab' => 'tool:ab',
17-
'update-self' => 'self-update:up',
18-
'updateself' => 'self-update:up',
19-
'selfupdate' => 'self-update:up',
20-
'self-update' => 'self-update:up',
17+
'update-self' => 'self-update:down',
18+
'updateself' => 'self-update:down',
19+
'selfupdate' => 'self-update:down',
20+
'self-update' => 'self-update:down',
2121
],
2222
'disabledGroups' => ['http', 'asset'],
2323
],

0 commit comments

Comments
 (0)