Skip to content

Commit

Permalink
feat: add experimental version selector (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmenewbie03 authored May 12, 2024
1 parent 07c7ff3 commit b1c2eb9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions resources/views/livewire/experimentals-index.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?php
use Livewire\Volt\Component;
use Salahhusa9\Updater\Helpers\Git;
use Mary\Traits\Toast;
new class extends Component {
use Toast;
public $versions = [];
public $selected_version = null;
public function boot()
Expand All @@ -19,9 +23,15 @@ public function boot()
}
public function update()
{
dd($this->selected_version);
// WARN: I WON'T TRY TO IMPLEMENT IT HERE I MIGHT LOSE
// MY PROGRESS
if (Updater::getCurrentVersion() == 'main') {
$this->error('This feature is not allowed in the bleeding edge version.');
return;
}
Artisan::call('down');
Git::checkout($this->selected_version);
Artisan::call('up');
session()->flash('update_result', 'Now using ' . $this->selected_version);
return $this->redirect(route('dashboard'));
}
}; ?>

Expand Down

0 comments on commit b1c2eb9

Please sign in to comment.