Set last build number, updating via composer
This commit is contained in:
parent
f6eade56af
commit
78d722adf0
|
|
@ -49,6 +49,9 @@
|
|||
"scripts": {
|
||||
"post-create-project-cmd": [
|
||||
"php artisan key:generate"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"php artisan october:util set build"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
|
|
|
|||
|
|
@ -357,6 +357,22 @@ class UpdateManager
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asks the gateway for the lastest build number and stores it.
|
||||
* @return void
|
||||
*/
|
||||
public function setBuildNumberManually()
|
||||
{
|
||||
$result = $this->requestServerData('ping');
|
||||
$build = (int) array_get($result, 'pong', 420);
|
||||
|
||||
Parameter::set([
|
||||
'system::core.build' => $build
|
||||
]);
|
||||
|
||||
return $build;
|
||||
}
|
||||
|
||||
//
|
||||
// Modules
|
||||
//
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Config;
|
|||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use System\Classes\UpdateManager;
|
||||
use System\Classes\CombineAssets;
|
||||
|
||||
/**
|
||||
|
|
@ -109,6 +110,21 @@ class OctoberUtil extends Command
|
|||
// Utilties
|
||||
//
|
||||
|
||||
protected function utilSetBuild()
|
||||
{
|
||||
$build = UpdateManager::instance()->setBuildNumberManually();
|
||||
|
||||
$this->comment('-');
|
||||
$this->comment('*** October sets build: '.$build);
|
||||
$this->comment('-');
|
||||
sleep(1);
|
||||
$this->comment('Ping? Pong!');
|
||||
$this->comment('-');
|
||||
sleep(1);
|
||||
$this->comment('Ping? Pong!');
|
||||
$this->comment('-');
|
||||
}
|
||||
|
||||
protected function utilCompileJs()
|
||||
{
|
||||
$this->utilCompileAssets('js');
|
||||
|
|
|
|||
Loading…
Reference in New Issue