<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hnhdigital-os / laravel-console-self-update example snippets
namespace App\Commands;
use HnhDigital\LaravelConsoleSelfUpdate\SelfUpdateInterface;
use HnhDigital\LaravelConsoleSelfUpdate\SelfUpdateTrait;
use LaravelZero\Framework\Commands\Command;
class SelfUpdateCommand extends Command implements SelfUpdateInterface
{
use SelfUpdateTrait;
/**
* The signature of the command.
*
* @var string
*/
protected $signature = 'self-update
{--tag=0 : Set a specific tag to install}
{--check-version : Return the version of this current binary}';
/**
* The description of the command.
*
* @var string
*/
protected $description = 'Self-update this binary';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->setUrl('https://example.com');
$this->runSelfUpdate();
}
}
...
public function handle()
{
...
$this->setVersionsTagKey('path');
...
}
...
...
public function handle()
{
...
$this->setHashSource(self::CHECKSUM_TOP_LEVEL);
$this->setHashPath('checksums');
...
}
...
...
public function handle()
{
...
$this->setHashSource(self::CHECKSUM_VERSIONS);
$this->setHashPath('sha256');
...
}
...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.