Skip to content
Closed
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
4 changes: 3 additions & 1 deletion .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ jobs:
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: turbo-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo/turbo*
path: |
target/${{ matrix.settings.target }}/release-turborepo/turbo*
target/${{ matrix.settings.target }}/release-turborepo/*.dll

npm-publish:
name: "Publish To NPM"
Expand Down
12 changes: 11 additions & 1 deletion packages/turbo-releaser/src/operations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ describe("packPlatform", () => {
const mockCopyFile = mock.fn((_src: string, _dst: string) =>
Promise.resolve()
);
const mockReaddir = mock.fn(() => Promise.resolve(["ghostty-vt.DLL"]));
const mockStat = mock.fn(() => Promise.resolve({ mode: 0 }));
const mockChmod = mock.fn();

t.mock.method(native, "generateNativePackage", mockGenerateNativePackage);
t.mock.method(fs, "mkdir", mockMkdir);
t.mock.method(fs, "readdir", mockReaddir);
t.mock.method(fs, "stat", mockStat);
t.mock.method(fs, "chmod", mockChmod);
t.mock.method(fs, "copyFile", mockCopyFile);
Expand All @@ -74,9 +76,17 @@ describe("packPlatform", () => {
mockCopyFile.mock.calls[0].arguments[1].endsWith("turbo.exe"),
"destination ends with .exe"
);
assert.ok(
mockCopyFile.mock.calls[1].arguments[0].endsWith("ghostty-vt.DLL"),
"source includes DLL sidecar"
);
assert.ok(
mockCopyFile.mock.calls[1].arguments[1].endsWith("ghostty-vt.DLL"),
"destination includes DLL sidecar"
);
assert.equal(mockGenerateNativePackage.mock.calls.length, 1);
assert.equal(mockMkdir.mock.calls.length, 1);
assert.equal(mockCopyFile.mock.calls.length, 1);
assert.equal(mockCopyFile.mock.calls.length, 2);
assert.equal(mockChmod.mock.calls.length, 1);
assert.equal(mockChmod.mock.calls[0].arguments[1], 0o111);
Comment on lines 87 to 91
});
Expand Down
10 changes: 10 additions & 0 deletions packages/turbo-releaser/src/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ async function packPlatform({
const destPath = path.join(scaffoldDir, "bin", binaryName);
await fs.mkdir(path.dirname(destPath), { recursive: true });
await fs.copyFile(sourcePath, destPath);
if (os === "windows") {
for (const file of await fs.readdir(path.dirname(sourcePath))) {
if (file.toLowerCase().endsWith(".dll")) {
await fs.copyFile(
path.join(path.dirname(sourcePath), file),
path.join(scaffoldDir, "bin", file)
);
}
}
}
const stat = await fs.stat(destPath);
const currMode = stat.mode;
// eslint-disable-next-line no-bitwise -- necessary for enabling the executable bits
Expand Down