👟 Reproduction steps
When executing push sites or push functions and selecting deploy, all files under the site or function directory will be packaged.
👍 Expected behavior
Filter and exclude based on the .gitignore file in the directory or the ignore configuration in appwrite.config.json.
👎 Actual Behavior
In the deployment.ts file,'packageDirectory' function, the tar command does not filter files based on ignore rules, resulting in all files under the site or function directories being packaged into the .tar.gz file, including directories like node_modules.
/**
* Package a directory into a tar.gz File object for deployment
* @private - Only used internally by pushDeployment
*/
async function packageDirectory(dirPath: string): Promise<File> {
const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
await tar.create(
{
gzip: true,
file: tempFile,
cwd: dirPath,
},
["."],
);
const buffer = fs.readFileSync(tempFile);
fs.unlinkSync(tempFile);
return new File([buffer], path.basename(tempFile), {
type: "application/gzip",
});
}
🎲 Appwrite version
Version 1.8.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
👟 Reproduction steps
When executing push sites or push functions and selecting deploy, all files under the site or function directory will be packaged.
👍 Expected behavior
Filter and exclude based on the .gitignore file in the directory or the ignore configuration in appwrite.config.json.
👎 Actual Behavior
In the deployment.ts file,'packageDirectory' function, the tar command does not filter files based on ignore rules, resulting in all files under the site or function directories being packaged into the .tar.gz file, including directories like node_modules.
🎲 Appwrite version
Version 1.8.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?