mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Fix static html detection
This commit is contained in:
1 parent
c4d5ce154c
commit
93feb38b67
2 files changed
+5
No files matched your search
@@ -1391,6 +1391,9 @@ class Builds extends Action
|
||||
$listFilesCommand .= ' && ( [ -e ' . \escapeshellarg($file) . ' ] && echo ' . \escapeshellarg($file) . ' || true )';
|
||||
}
|
||||
|
||||
// Static fallback detection only needs to distinguish 0, 1, or 2+ HTML files, so cap the output
|
||||
$listFilesCommand .= ' && find . -name \'node_modules\' -prune -o -type f -name \'*.html\' -print | head -n 2';
|
||||
|
||||
$listFilesCommand .= ' && echo "{APPWRITE_DETECTION_SEPARATOR_END}"';
|
||||
|
||||
if (empty($command)) {
|
||||
|
||||
@@ -50,6 +50,7 @@ final class BuildsTest extends TestCase
|
||||
$this->assertStringStartsWith('npm run build && echo "{APPWRITE_DETECTION_SEPARATOR_START}"', $command);
|
||||
$this->assertStringContainsString('cd /usr/local/build && cd \'./dist folder\'', (string) $command);
|
||||
$this->assertStringContainsString('( [ -e \'server/entry.mjs\' ] && echo \'server/entry.mjs\' || true )', (string) $command);
|
||||
$this->assertStringContainsString('find . -name \'node_modules\' -prune -o -type f -name \'*.html\' -print | head -n 2', (string) $command);
|
||||
$this->assertStringEndsWith('echo "{APPWRITE_DETECTION_SEPARATOR_END}"', $command);
|
||||
}
|
||||
|
||||
@@ -59,6 +60,7 @@ final class BuildsTest extends TestCase
|
||||
|
||||
$this->assertStringStartsWith('echo "{APPWRITE_DETECTION_SEPARATOR_START}"', $command);
|
||||
$this->assertStringContainsString('cd /usr/local/build && ( [ -e \'handler.js\' ] && echo \'handler.js\' || true )', (string) $command);
|
||||
$this->assertStringContainsString('find . -name \'node_modules\' -prune -o -type f -name \'*.html\' -print | head -n 2', (string) $command);
|
||||
}
|
||||
|
||||
public function testSplitSiteDetectionLogsRemovesDetectionBlock(): void
|
||||
|
||||
Reference in new issue
Block a user