Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Merge branch 'main' into application-update-submodules-after-git-checkout

Andras Bacsai884c46b0542d
diff --cc app/Models/Application.php
index 3263d8d725,4d330a00c2..6a57e76e09
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@@ -905,14 -904,27 +906,36 @@@ class Application extends BaseMode
: explode(',', $this->fqdn),
);
}
-
+ protected function buildGitCheckoutCommand($target): string {
+ $command = "git checkout $target";
+
+ if ($this->settings->is_git_submodules_enabled) {
+ $command .= " && git submodule update --init --recursive";
+ }
+
+ return $command;
++
+ public function watchPaths(): Attribute
+ {
+ return Attribute::make(
+ set: function ($value) {
+ if ($value) {
+ return trim($value);
+ }
+ }
+ );
+ }
+ public function isWatchPathsTriggered(Collection $modified_files): bool
+ {
+ if (is_null($this->watch_paths)) {
+ return false;
+ }
+ $watch_paths = collect(explode("\n", $this->watch_paths));
+ $matches = $modified_files->filter(function ($file) use ($watch_paths) {
+ return $watch_paths->contains(function ($glob) use ($file) {
+ return fnmatch($glob, $file);
+ });
+ });
+ return $matches->count() > 0;
}
}