aboutsummaryrefslogtreecommitdiff
path: root/yeetfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'yeetfile.js')
-rw-r--r--yeetfile.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/yeetfile.js b/yeetfile.js
index 0dc9503..94388be 100644
--- a/yeetfile.js
+++ b/yeetfile.js
@@ -1,5 +1,7 @@
+$`npm run assets`;
+
["amd64", "arm64", "riscv64"].forEach(goarch => {
- [deb, rpm].forEach(method => method.build({
+ [deb, rpm, tarball].forEach(method => method.build({
name: "anubis",
description: "Anubis weighs the souls of incoming HTTP requests and uses a sha256 proof-of-work challenge in order to protect upstream resources from scraper bots.",
homepage: "https://anubis.techaro.lol",
@@ -10,19 +12,16 @@
"./README.md": "README.md",
"./LICENSE": "LICENSE",
"./docs/docs/CHANGELOG.md": "CHANGELOG.md",
+ "./docs/docs/admin/policies.md": "policies.md",
+ "./docs/docs/admin/native-install.mdx": "native-install.mdx",
+ "./data/botPolicies.json": "botPolicies.json",
},
- build: (out) => {
- // install Anubis binary
- go.build("-o", `${out}/usr/bin/anubis`, "./cmd/anubis");
-
- // install systemd unit
- yeet.run("mkdir", "-p", `${out}/usr/lib/systemd/system`);
- yeet.run("cp", "run/anubis@.service", `${out}/usr/lib/systemd/system/anubis@.service`);
+ build: ({ bin, etc, systemd, out }) => {
+ $`go build -o ${bin}/anubis -ldflags '-s -w -extldflags "-static" -X "github.com/TecharoHQ/anubis.Version=${git.tag()}"' ./cmd/anubis`;
- // install default config
- yeet.run("mkdir", "-p", `${out}/etc/anubis`);
- yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
+ file.install("./run/anubis@.service", `${systemd}/anubis@.service`);
+ file.install("./run/default.env", `${etc}/default.env`);
},
}));
}); \ No newline at end of file