From 4f01edb9230f58ff84b0dd892c931ec8ac9aad55 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 13 Sep 2022 12:56:08 +0200 Subject: move src out of srv, clean up default.nix and Makefile --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 50795e3..2f864d8 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,22 @@ CONFIG = ./config.nix +BASH = $$(nix-build --no-out-link -A pkgs.bash)/bin/bash entrypoint: - nix-build -A entrypoint \ - --arg config '(import ${CONFIG})' + nix-build -A entrypoint --arg config '(import ${CONFIG})' -install: - $$(nix-build -A install --arg config '(import ${CONFIG})') +install-systemd: + $$(nix-build --no-out-link -A install --arg config '(import ${CONFIG})') test: - $$(nix-build --no-out-link -A pkgs.bash)/bin/bash srv-dev-env.sh \ - --run "cd srv/src && go test ./... -count=1 -tags integration" - @echo "\nTESTS PASSED!\n" + ${BASH} tmp-dev-env.sh \ + --run "cd src; go test ./... -count=1 -tags integration" -srv.dev-shell: - $$(nix-build --no-out-link -A pkgs.bash)/bin/bash srv-dev-env.sh \ - --command "cd srv/src; return" - -srv.shell: - nix-shell -A srv.shellWithBuild --arg config '(import ${CONFIG})' \ - --command 'cd srv/src; return' +shell: + ${BASH} tmp-dev-env.sh \ + --command " \ + cd src; \ + echo 'Loading test data...'; \ + (cd cmd/load-test-data && go run main.go); \ + return; \ + " -- cgit v1.2.3