chore: switch to build script

This commit is contained in:
Aarnav Tale
2025-10-19 14:09:56 -04:00
parent 53b8f76ac6
commit a68df033a2
8 changed files with 213 additions and 115 deletions
-31
View File
@@ -3,37 +3,6 @@ go = "1.25.1"
pnpm = "10.4.0"
node = "22.16"
[tasks.copy-wasm-shim]
alias = ["gojs"]
description = "Copies Go's wasm_exec.js to the public directory"
run = [
"echo // $(go version) > app/wasm_exec.js",
"cat $(go env GOROOT)/lib/wasm/wasm_exec.js >> app/wasm_exec.js",
]
[tasks.build-go-wasm]
alias = ["wasm"]
depends = ["copy-wasm-shim"]
description = "Builds the Go WebAssembly module for Tailscale SSH"
env = { GOOS = "js", GOARCH = "wasm" }
run = "go build -o app/hp_ssh.wasm ./cmd/hp_ssh"
[tasks.build-go-agent]
alias = ["agent"]
description = "Builds the Go agent for HostInfo"
run = "go build -o build/hp_agent ./cmd/hp_agent"
# env = { CGO_ENABLED = "1" }
# run = "go build -o build/hp_agent.so -buildmode=c-shared ./cmd/hp_agent"
[tasks.build-fake-shell]
alias = ["fake-shell"]
description = "Builds the fake shell for Distroless docker images"
run = [
'test -n "$IMAGE_TAG" || (echo "IMAGE_TAG is not set" && exit 1)',
'go build -ldflags="-s -w -X main.imageTag=$IMAGE_TAG" -o build/sh ./cmd/fake_sh'
]
[tasks.build-nixos-docs]
alias = ["nixos-docs"]
description = "Builds NixOS module documentation"