-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyeetfile.js
47 lines (39 loc) · 1.18 KB
/
yeetfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const pkgs = [];
["amd64", "arm64"].forEach(goarch =>
[deb, rpm, tarball].forEach(method => {
pkgs.push(method.build({
name: "yeet",
description: "Yeet out scripts with maximum haste!",
homepage: "https://techaro.lol",
license: "MIT",
goarch,
documentation: {
"README.md": "README.md",
"doc/api.md": "api.md",
},
build: ({ bin }) => {
go.build("-o", `${bin}/yeet`, "./cmd/yeet");
},
}));
})
);
log.println(git.tag());
pkgs.map(pkg => {
gitea.uploadPackage("Techaro", "yeet", "unstable", pkg);
})
tarball.build({
name: "yeet-src-vendor",
license: "MIT",
// XXX(Xe): This is needed otherwise go will be very sad.
platform: yeet.goos,
goarch: yeet.goarch,
build: ({ out }) => {
// prepare clean checkout in $out
$`git archive --format=tar HEAD | tar xC ${out}`;
// vendor Go dependencies
$`cd ${out} && go mod vendor`;
// write VERSION file
$`echo ${git.tag()} > ${out}/VERSION`;
},
mkFilename: ({ name, version }) => `${name}-${version}`,
});