Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .easignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ apps/discord-bot/*
!/native/libghostty-vt
/native/libghostty-vt/*
!/native/libghostty-vt/LICENSE
# Mobile native modules symlink their shared sources from here.
!/native/apple-speech
release/
release-mock/
dist-electron/
Expand Down
39 changes: 39 additions & 0 deletions scripts/easignore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,43 @@ describe("EAS archive ignore rules", () => {
NodeFS.rmSync(fixtureRoot, { force: true, recursive: true });
}
});

it("keeps the target of every tracked mobile symlink in the archive", () => {
const fixtureRoot = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-easignore-"));

try {
NodeChildProcess.execFileSync("git", ["init", "--quiet"], {
cwd: fixtureRoot,
stdio: "ignore",
});
NodeFS.copyFileSync(
NodePath.join(repositoryRoot, ".easignore"),
NodePath.join(fixtureRoot, ".gitignore"),
);
const symlinks = NodeChildProcess.execFileSync("git", ["ls-files", "-s", "apps/mobile"], {
cwd: repositoryRoot,
encoding: "utf8",
})
.split("\n")
.filter((line) => line.startsWith("120000 "))
.map((line) => line.slice(line.indexOf("\t") + 1));
expect(symlinks.length).toBeGreaterThan(0);

for (const link of symlinks) {
const target = NodePath.relative(
repositoryRoot,
NodePath.resolve(
repositoryRoot,
NodePath.dirname(link),
NodeFS.readlinkSync(NodePath.join(repositoryRoot, link)),
),
);
NodeFS.mkdirSync(NodePath.dirname(NodePath.join(fixtureRoot, target)), { recursive: true });
NodeFS.writeFileSync(NodePath.join(fixtureRoot, target), "fixture\n");
expect(isIgnored(fixtureRoot, target), `${link} -> ${target}`).toBe(false);
}
} finally {
NodeFS.rmSync(fixtureRoot, { force: true, recursive: true });
}
});
});
Loading