Skip to content

Commit d35a1a0

Browse files
committed
F go
1 parent 87c0fd3 commit d35a1a0

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

projects/go.dev/build.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ export default async function ({ prefix, tag }: BuildOptions) {
44
const arch = (() => {
55
switch (`${Deno.build.os}/${Deno.build.arch}`) {
66
case "darwin/x86_64":
7-
return "darwin-amd64";
7+
return "darwin-amd64.tar.gz";
88
case "linux/x86_64":
9-
return "linux-amd64";
9+
return "linux-amd64.tar.gz";
1010
case "windows/x86_64":
11-
return "windows-amd64";
11+
return "windows-amd64.zip";
1212
case "linux/aarch64":
13-
return "linux-arm64";
13+
return "linux-arm64.tar.gz";
1414
case "darwin/aarch64":
15-
return "darwin-arm64";
15+
return "darwin-arm64.tar.gz";
1616
default:
1717
throw new Error("Unsupported platform");
1818
}
1919
})();
2020

2121
prefix.mkdir('p').cd();
22-
await unarchive(`https://go.dev/dl/go${tag}.${arch}.tar.gz`, {cache: false, stripComponents: 1});
22+
await unarchive(`https://go.dev/dl/go${tag}.${arch}`);
2323
}

projects/go.dev/fixup.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Path } from "brewkit";
22

33
export default function (path: Path) {
4-
if (path.components().includes("src")) {
5-
return false;
6-
} else {
7-
return true;
8-
}
4+
// stripping fails for plenty of stuff in `src`
5+
if (path.components().includes("src")) return false;
6+
// these go binaries are ”not dynamic executables” and thus `ldd` fails to inspect them!
7+
if (path.parent().basename() == "bin") return false;
8+
if (path.basename() == "doc") return false;
9+
if (path.string.includes("pkg/tool/linux_")) return false;
10+
return true;
911
}

0 commit comments

Comments
 (0)