diff --git a/.air/appview.toml b/.air/appview.toml index af4835bb..23e91712 100644 --- a/.air/appview.toml +++ b/.air/appview.toml @@ -1,8 +1,10 @@ -[build] -cmd = "tailwindcss -i input.css -o ./appview/pages/static/tw.css && go build -o .bin/app ./cmd/appview/main.go" -bin = ";set -o allexport && source .env && set +o allexport; .bin/app" root = "." +tmp_dir = "out" + +[build] +cmd = "go build -o out/appview.out cmd/appview/main.go" +bin = "out/appview.out" -exclude_regex = [".*_templ.go"] -include_ext = ["go", "templ", "html", "css"] -exclude_dir = ["target", "atrium", "nix"] +include_ext = ["go"] +exclude_dir = ["avatar", "camo", "indexes", "nix", "tmp"] +stop_on_error = true diff --git a/.air/knot.toml b/.air/knot.toml new file mode 100644 index 00000000..5d12cd6c --- /dev/null +++ b/.air/knot.toml @@ -0,0 +1,11 @@ +root = "." +tmp_dir = "out" + +[build] +cmd = 'go build -ldflags "-X tangled.org/core/knotserver.version=$(git describe --tags --long)" -o out/knot.out cmd/knot/main.go' +bin = "out/knot.out" +args_bin = "server" + +include_ext = ["go"] +exclude_dir = ["avatar", "camo", "indexes", "nix", "tmp"] +stop_on_error = true diff --git a/.air/knotserver.toml b/.air/knotserver.toml deleted file mode 100644 index 18eacc00..00000000 --- a/.air/knotserver.toml +++ /dev/null @@ -1,7 +0,0 @@ -[build] -cmd = 'go build -ldflags "-X tangled.org/core/knotserver.version=$(git describe --tags --long)" -o .bin/knot ./cmd/knot/' -bin = ".bin/knot server" -root = "." - -exclude_regex = [""] -include_ext = ["go", "templ"] diff --git a/.air/spindle.toml b/.air/spindle.toml new file mode 100644 index 00000000..87a32617 --- /dev/null +++ b/.air/spindle.toml @@ -0,0 +1,10 @@ +root = "." +tmp_dir = "out" + +[build] +cmd = "go build -o out/spindle.out cmd/spindle/main.go" +bin = "out/spindle.out" + +include_ext = ["go"] +exclude_dir = ["avatar", "camo", "indexes", "nix", "tmp"] +stop_on_error = true diff --git a/flake.nix b/flake.nix index 65f12b2b..ea60e98a 100644 --- a/flake.nix +++ b/flake.nix @@ -184,12 +184,9 @@ air-watcher = name: arg: pkgs.writeShellScriptBin "run" '' - ${pkgs.air}/bin/air -c /dev/null \ - -build.cmd "${pkgs.go}/bin/go build -o ./out/${name}.out ./cmd/${name}/main.go" \ - -build.bin "./out/${name}.out" \ - -build.args_bin "${arg}" \ - -build.stop_on_error "true" \ - -build.include_ext "go" + export PATH=${pkgs.go}/bin:$PATH + ${pkgs.air}/bin/air -c ./.air/${name}.toml \ + -build.args_bin "${arg}" ''; tailwind-watcher = pkgs.writeShellScriptBin "run"