aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-28 14:33:57 -0400
committerXe Iaso <me@xeiaso.net>2025-03-28 14:33:57 -0400
commitbb4f49cfd94783111e2fbed99b4ea7a2077fa0bf (patch)
treeb8edc79b1aadb522028accb59a401270f2b35496
parent38d62eeb5676d010a08c439fdcedb4741c021bff (diff)
downloadanubis-bb4f49cfd94783111e2fbed99b4ea7a2077fa0bf.tar.xz
anubis-bb4f49cfd94783111e2fbed99b4ea7a2077fa0bf.zip
yeetfile: build debian packages
Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--.gitignore1
-rw-r--r--yeetfile.js36
2 files changed, 20 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index b54eb8e..7debfec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.env
+*.deb
*.rpm
# Go binaries and test artifacts
diff --git a/yeetfile.js b/yeetfile.js
index 730e7d1..ae22fbf 100644
--- a/yeetfile.js
+++ b/yeetfile.js
@@ -1,22 +1,24 @@
go.install();
-["amd64", "arm64"].forEach(goarch => rpm.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://xeiaso.net/blog/2025/anubis",
- license: "MIT",
- goarch,
+["amd64", "arm64"].forEach(goarch => {
+ [deb, rpm].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://xeiaso.net/blog/2025/anubis",
+ license: "MIT",
+ goarch,
- build: (out) => {
- // install Anubis binary
- go.build("-o", `${out}/usr/bin/anubis`);
+ 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`);
+ // 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`);
- // install default config
- yeet.run("mkdir", "-p", `${out}/etc/anubis`);
- yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
- },
-})); \ No newline at end of file
+ // install default config
+ yeet.run("mkdir", "-p", `${out}/etc/anubis`);
+ yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
+ },
+ }));
+}); \ No newline at end of file