From 5a4c9422b2bd215ea0432c407c829dc1c0ac2aae Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 11 Oct 2023 12:10:40 +0200 Subject: [PATCH 1/4] fix: only require registry image in case of dockerimage bp --- app/Http/Livewire/Project/Application/General.php | 6 ++++++ .../views/livewire/project/application/general.blade.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index afe1b62dd..27e30ac18 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -125,6 +125,12 @@ class General extends Component { try { $this->validate(); + if (data_get($this->application,'build_pack') === 'dockerimage') { + $this->validate([ + 'application.docker_registry_image_name' => 'required', + 'application.docker_registry_image_tag' => 'required', + ]); + } if (data_get($this->application, 'fqdn')) { $domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) { return Str::of($domain)->trim()->lower(); diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 4492c8192..c156645a9 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -73,8 +73,8 @@ @else
- - + +
@endif From 5b74fd34f564f01346eedb513741e299854f5f78 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 11 Oct 2023 12:12:25 +0200 Subject: [PATCH 2/4] fix: instant save build pack change --- app/Http/Livewire/Project/Application/General.php | 3 +++ resources/views/livewire/project/application/general.blade.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index 27e30ac18..acc377094 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -76,6 +76,9 @@ class General extends Component ]; + public function updatedApplicationBuildPack(){ + $this->submit(); + } public function instantSave() { // @TODO: find another way - if possible diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index c156645a9..2962cdaa9 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -21,7 +21,7 @@ @if (!$application->dockerfile)
- + From 9f8c44d96b338c569ee2a0964bbcaebaa0f9ead5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 11 Oct 2023 12:33:06 +0200 Subject: [PATCH 3/4] version++ --- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index aae1119e5..48463cf03 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.75', + 'release' => '4.0.0-beta.76', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 2d7480b05..5c888f006 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Wed, 11 Oct 2023 12:56:57 +0200 Subject: [PATCH 4/4] fix: public git --- app/Http/Livewire/Project/New/PublicGitRepository.php | 6 +++++- .../livewire/project/new/public-git-repository.blade.php | 9 ++++----- resources/views/livewire/project/new/select.blade.php | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/Http/Livewire/Project/New/PublicGitRepository.php b/app/Http/Livewire/Project/New/PublicGitRepository.php index ebcbb8253..f1f4e9833 100644 --- a/app/Http/Livewire/Project/New/PublicGitRepository.php +++ b/app/Http/Livewire/Project/New/PublicGitRepository.php @@ -72,10 +72,14 @@ class PublicGitRepository extends Component public function load_branch() { try { - $this->branch_found = false; $this->validate([ 'repository_url' => 'required|url' ]); + } catch (\Throwable $e) { + return handleError($e, $this); + } + try { + $this->branch_found = false; $this->get_git_source(); $this->get_branch(); $this->selected_branch = $this->git_branch; diff --git a/resources/views/livewire/project/new/public-git-repository.blade.php b/resources/views/livewire/project/new/public-git-repository.blade.php index 78f7742c9..37459187b 100644 --- a/resources/views/livewire/project/new/public-git-repository.blade.php +++ b/resources/views/livewire/project/new/public-git-repository.blade.php @@ -1,13 +1,13 @@

Create a new Application

Deploy any public Git repositories.
-
+
- - + Check repository
@@ -16,10 +16,9 @@
Rate Limit
+ helper="Rate limit remaining: {{ $rate_limit_remaining }}
Rate limit reset at: {{ $rate_limit_reset }} UTC" />
@endif -

Details

@if ($git_source === 'other') diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php index a7693de0d..2aa62e83e 100644 --- a/resources/views/livewire/project/new/select.blade.php +++ b/resources/views/livewire/project/new/select.blade.php @@ -25,7 +25,7 @@ Public Repository
- You can deploy any kind of public repositories from the supported git servers. + You can deploy any kind of public repositories from the supported git providers.