From abd855477eeb758456df8968b29815df344fa2ad Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:45:14 +0000 Subject: [PATCH] fix: use rsync to filter .git --- src/Appwrite/Platform/Workers/Builds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Builds.php b/src/Appwrite/Platform/Workers/Builds.php index be6b917607..99e710b2e5 100644 --- a/src/Appwrite/Platform/Workers/Builds.php +++ b/src/Appwrite/Platform/Workers/Builds.php @@ -242,7 +242,7 @@ class Builds extends Action Console::execute('mkdir -p ' . $tmpDirectory . '/' . $rootDirectory, '', $stdout, $stderr); // Merge template into user repo - Console::execute('cp -rfn ' . $tmpTemplateDirectory . '/' . $templateRootDirectory . '/. ' . $tmpDirectory . '/' . $rootDirectory, '', $stdout, $stderr); + Console::execute('rsync -av --exclude \'.git\' ' . $tmpTemplateDirectory . '/' . $templateRootDirectory . '/ ' . $tmpDirectory . '/' . $rootDirectory, '', $stdout, $stderr); // Commit and push $exit = Console::execute('git config --global user.email "team@appwrite.io" && git config --global user.name "Appwrite" && cd ' . $tmpDirectory . ' && git add . && git commit -m "Create \'' . \escapeshellcmd($function->getAttribute('name', '')) . '\' function" && git push origin ' . \escapeshellcmd($branchName), '', $stdout, $stderr);