Skip to content

Commit

Permalink
feat(versions): Implement new version management for Console package (#…
Browse files Browse the repository at this point in the history
…32)

* feat(versions): Implement new version management for Console package

* refactor(versions): Avoid static definition

* refactor(versions): Apply changes according to services review
  • Loading branch information
warlof authored Jan 7, 2019
1 parent 61a62ec commit b97cbfe
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions src/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

namespace Seat\Console;

use Illuminate\Support\ServiceProvider;
use Seat\Console\Commands\Esi\Dispatch;
use Seat\Console\Commands\Esi\Ping;
use Seat\Console\Commands\Esi\Update\Characters as CharactersUpdater;
Expand All @@ -39,8 +38,9 @@
use Seat\Console\Commands\Seat\Cache\Clear;
use Seat\Console\Commands\Seat\Queue\Status;
use Seat\Console\Commands\Seat\Version;
use Seat\Services\AbstractSeatPlugin;

class ConsoleServiceProvider extends ServiceProvider
class ConsoleServiceProvider extends AbstractSeatPlugin
{
/**
* Bootstrap the application services.
Expand Down Expand Up @@ -91,4 +91,54 @@ public function register()
$this->mergeConfigFrom(
__DIR__ . '/Config/console.config.php', 'console.config');
}

/**
* Return the plugin public name as it should be displayed into settings.
*
* @return string
*/
public function getName(): string
{
return 'SeAT Console';
}

/**
* Return the plugin repository address.
*
* @return string
*/
public function getPackageRepositoryUrl(): string
{
return 'https://github.com/eveseat/console';
}

/**
* Return the plugin technical name as published on package manager.
*
* @return string
*/
public function getPackagistPackageName(): string
{
return 'console';
}

/**
* Return the plugin vendor tag as published on package manager.
*
* @return string
*/
public function getPackagistVendorName(): string
{
return 'eveseat';
}

/**
* Return the plugin installed version.
*
* @return string
*/
public function getVersion(): string
{
return config('console.config.version');
}
}

0 comments on commit b97cbfe

Please sign in to comment.