mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
refactor self updating
This commit is contained in:
parent
4822d787f8
commit
c77faa746d
@ -54,7 +54,7 @@ class SelfUpdateController extends BaseController
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
public function update()
|
||||
public function update(\Codedge\Updater\UpdaterManager $updater)
|
||||
{
|
||||
define('STDIN', fopen('php://stdin', 'r'));
|
||||
|
||||
@ -62,14 +62,14 @@ class SelfUpdateController extends BaseController
|
||||
return response()->json(['message' => ctrans('texts.self_update_not_available')], 403);
|
||||
}
|
||||
|
||||
/* .git MUST be owned/writable by the webserver user */
|
||||
$repo = new GitRepository(base_path());
|
||||
// /* .git MUST be owned/writable by the webserver user */
|
||||
// $repo = new GitRepository(base_path());
|
||||
|
||||
nlog('Are there changes to pull? '.$repo->hasChanges());
|
||||
$output = '';
|
||||
// nlog('Are there changes to pull? '.$repo->hasChanges());
|
||||
// $output = '';
|
||||
|
||||
|
||||
$updater = new \Codedge\Updater\UpdaterManager()
|
||||
// $updater = new \Codedge\Updater\UpdaterManager();
|
||||
|
||||
// Check if new version is available
|
||||
if($updater->source()->isNewVersionAvailable()) {
|
||||
|
46
composer.lock
generated
46
composer.lock
generated
@ -51,16 +51,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.176.9",
|
||||
"version": "3.178.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "17dc67514b148979994758fbfb54088a8a3393bf"
|
||||
"reference": "214e3d98c54277cd8965f1cf307dce39631407bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/17dc67514b148979994758fbfb54088a8a3393bf",
|
||||
"reference": "17dc67514b148979994758fbfb54088a8a3393bf",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/214e3d98c54277cd8965f1cf307dce39631407bf",
|
||||
"reference": "214e3d98c54277cd8965f1cf307dce39631407bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -135,9 +135,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.176.9"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.178.0"
|
||||
},
|
||||
"time": "2021-04-06T18:13:47+00:00"
|
||||
"time": "2021-04-08T18:13:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -2841,16 +2841,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v8.36.1",
|
||||
"version": "v8.36.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "91c454715b81b9a39f718651d4e2f8104d45e7c2"
|
||||
"reference": "0debd8ad6b5aa1f61ccc73910adf049af4ca0444"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/91c454715b81b9a39f718651d4e2f8104d45e7c2",
|
||||
"reference": "91c454715b81b9a39f718651d4e2f8104d45e7c2",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/0debd8ad6b5aa1f61ccc73910adf049af4ca0444",
|
||||
"reference": "0debd8ad6b5aa1f61ccc73910adf049af4ca0444",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3005,7 +3005,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2021-04-06T21:14:06+00:00"
|
||||
"time": "2021-04-07T12:37:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/slack-notification-channel",
|
||||
@ -10910,16 +10910,16 @@
|
||||
},
|
||||
{
|
||||
"name": "facade/flare-client-php",
|
||||
"version": "1.5.0",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facade/flare-client-php.git",
|
||||
"reference": "9dd6f2b56486d939c4467b3f35475d44af57cf17"
|
||||
"reference": "f2b0969f2d9594704be74dbeb25b201570a98098"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/9dd6f2b56486d939c4467b3f35475d44af57cf17",
|
||||
"reference": "9dd6f2b56486d939c4467b3f35475d44af57cf17",
|
||||
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/f2b0969f2d9594704be74dbeb25b201570a98098",
|
||||
"reference": "f2b0969f2d9594704be74dbeb25b201570a98098",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -10963,7 +10963,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/facade/flare-client-php/issues",
|
||||
"source": "https://github.com/facade/flare-client-php/tree/1.5.0"
|
||||
"source": "https://github.com/facade/flare-client-php/tree/1.6.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -10971,26 +10971,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-31T07:32:54+00:00"
|
||||
"time": "2021-04-08T08:50:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "facade/ignition",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facade/ignition.git",
|
||||
"reference": "bdc8b0b32c888f6edc838ca641358322b3d9506d"
|
||||
"reference": "cb7f790e6306caeb4a9ffe21e59942b7128cc630"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/facade/ignition/zipball/bdc8b0b32c888f6edc838ca641358322b3d9506d",
|
||||
"reference": "bdc8b0b32c888f6edc838ca641358322b3d9506d",
|
||||
"url": "https://api.github.com/repos/facade/ignition/zipball/cb7f790e6306caeb4a9ffe21e59942b7128cc630",
|
||||
"reference": "cb7f790e6306caeb4a9ffe21e59942b7128cc630",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"facade/flare-client-php": "^1.3.7",
|
||||
"facade/flare-client-php": "^1.6",
|
||||
"facade/ignition-contracts": "^1.0.2",
|
||||
"filp/whoops": "^2.4",
|
||||
"illuminate/support": "^7.0|^8.0",
|
||||
@ -11048,7 +11048,7 @@
|
||||
"issues": "https://github.com/facade/ignition/issues",
|
||||
"source": "https://github.com/facade/ignition"
|
||||
},
|
||||
"time": "2021-03-30T15:55:38+00:00"
|
||||
"time": "2021-04-08T10:42:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "facade/ignition-contracts",
|
||||
|
@ -140,8 +140,10 @@ return [
|
||||
//]
|
||||
],
|
||||
'post_update' => [
|
||||
'class' => \App\Console\Commands\PostUpdate::class
|
||||
'postupdate:cleanup' => [
|
||||
'class' => \App\Console\Commands\PostUpdate::class,
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -6,6 +6,9 @@ use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', 'BaseController@flutterRoute')->middleware('guest');
|
||||
|
||||
Route::get('self-update', 'SelfUpdateController@update')->middleware('guest');
|
||||
|
||||
|
||||
Route::get('setup', 'SetupController@index')->middleware('guest');
|
||||
Route::post('setup', 'SetupController@doSetup')->middleware('guest');
|
||||
Route::get('update', 'SetupController@update')->middleware('guest');
|
||||
|
Loading…
x
Reference in New Issue
Block a user