Skip to content

Commit

Permalink
consolidation#497 Fix: Add Basic Self Update Functionality: User inje…
Browse files Browse the repository at this point in the history
…cted Version/Name
  • Loading branch information
amenk committed Sep 4, 2017
1 parent 9697fe6 commit b218084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function addSelfUpdateCommand($repository = null)
if ($repository == null) {
return;
}
$selfUpdateCommand = new SelfUpdateCommand('self:update', Robo::VERSION, $repository);
$selfUpdateCommand = new SelfUpdateCommand('self:update', $this->getName(), $this->getVersion(), $repository);
$this->add($selfUpdateCommand);
}
}
6 changes: 5 additions & 1 deletion src/SelfUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ class SelfUpdateCommand extends Command

protected $currentVersion;

public function __construct($name = null, $currentVersion = null, $gitHubRepository = null)
protected $applicationName;

public function __construct($name = null, $applicationName = null, $currentVersion = null, $gitHubRepository = null)
{
parent::__construct($name);

$this->applicationName = $applicationName;
$this->currentVersion = $currentVersion;
$this->gitHubRepository = $gitHubRepository;
}
Expand Down

0 comments on commit b218084

Please sign in to comment.