During deployment, the packaging command did not exclude the ignore files.

已关闭
#250 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ChiragAgg5k 已经在做这个了。

开始于 2026年2月24日。

评估

这个 Issue 还没有评估数据。

描述

👟 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?
  • I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
主要语言
Go
星标
104
派生
45
平均合并
52 分钟
30 天内合并 PR
13

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。