mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 04:05:23 -04:00
yeetfile: build debian packages
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
38d62eeb56
commit
bb4f49cfd9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
.env
|
.env
|
||||||
|
*.deb
|
||||||
*.rpm
|
*.rpm
|
||||||
|
|
||||||
# Go binaries and test artifacts
|
# Go binaries and test artifacts
|
||||||
|
36
yeetfile.js
36
yeetfile.js
@ -1,22 +1,24 @@
|
|||||||
go.install();
|
go.install();
|
||||||
|
|
||||||
["amd64", "arm64"].forEach(goarch => rpm.build({
|
["amd64", "arm64"].forEach(goarch => {
|
||||||
name: "anubis",
|
[deb, rpm].forEach(method => method.build({
|
||||||
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.",
|
name: "anubis",
|
||||||
homepage: "https://xeiaso.net/blog/2025/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.",
|
||||||
license: "MIT",
|
homepage: "https://xeiaso.net/blog/2025/anubis",
|
||||||
goarch,
|
license: "MIT",
|
||||||
|
goarch,
|
||||||
|
|
||||||
build: (out) => {
|
build: (out) => {
|
||||||
// install Anubis binary
|
// install Anubis binary
|
||||||
go.build("-o", `${out}/usr/bin/anubis`);
|
go.build("-o", `${out}/usr/bin/anubis`, "./cmd/anubis");
|
||||||
|
|
||||||
// install systemd unit
|
// install systemd unit
|
||||||
yeet.run("mkdir", "-p", `${out}/usr/lib/systemd/system`);
|
yeet.run("mkdir", "-p", `${out}/usr/lib/systemd/system`);
|
||||||
yeet.run("cp", "run/anubis@.service", `${out}/usr/lib/systemd/system/anubis@.service`);
|
yeet.run("cp", "run/anubis@.service", `${out}/usr/lib/systemd/system/anubis@.service`);
|
||||||
|
|
||||||
// install default config
|
// install default config
|
||||||
yeet.run("mkdir", "-p", `${out}/etc/anubis`);
|
yeet.run("mkdir", "-p", `${out}/etc/anubis`);
|
||||||
yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
|
yeet.run("cp", "run/anubis.env.default", `${out}/etc/anubis/anubis-default.env`);
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user