Test local git update (#3741)

* Add checks for duplicate contacts in invitations

* Fixes for self updater

* homebrew self updater
This commit is contained in:
David Bomba 2020-05-25 10:50:16 +10:00 committed by GitHub
parent ed5ce8634e
commit 6cc47fbcad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 10 deletions

View File

@ -16,6 +16,7 @@ use Codedge\Updater\UpdaterManager;
use Composer\Factory; use Composer\Factory;
use Composer\IO\NullIO; use Composer\IO\NullIO;
use Composer\Installer; use Composer\Installer;
use Cz\Git\GitRepository;
use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
@ -66,22 +67,29 @@ class SelfUpdateController extends BaseController
return response()->json(['message' => 'Self update not available on this system.'], 403); return response()->json(['message' => 'Self update not available on this system.'], 403);
} }
info("is new version available = ". $updater->source()->isNewVersionAvailable());
// Get the new version available $repo = new GitRepository(base_path());
$versionAvailable = $updater->source()->getVersionAvailable(); //info($repo->getCurrentBranchName());
$repo->pull('origin');
info($versionAvailable); // info("is new version available = ". $updater->source()->isNewVersionAvailable());
// Create a release // // Get the new version available
$release = $updater->source()->fetch($versionAvailable); // $versionAvailable = $updater->source()->getVersionAvailable();
info(print_r($release,1)); // info($versionAvailable);
// Run the update process // // Create a release
$res = $updater->source()->update($release); // $release = $updater->source()->fetch($versionAvailable);
info(print_r($res,1)); // info(print_r($release,1));
// // Run the update process
// $res = $updater->source()->update($release);
// info(print_r($res,1));
Artisan::call('ninja:post-update');
Artisan::call('ninja:post-update'); Artisan::call('ninja:post-update');

View File

@ -25,6 +25,7 @@
"cleverit/ubl_invoice": "^1.3", "cleverit/ubl_invoice": "^1.3",
"codedge/laravel-selfupdater": "~3.0", "codedge/laravel-selfupdater": "~3.0",
"composer/composer": "^1.10", "composer/composer": "^1.10",
"czproject/git-php": "^3.17",
"dacastro4/laravel-gmail": "^3.2", "dacastro4/laravel-gmail": "^3.2",
"doctrine/dbal": "^2.10", "doctrine/dbal": "^2.10",
"fedeisas/laravel-mail-css-inliner": "2.3", "fedeisas/laravel-mail-css-inliner": "2.3",