2021-08-31 03:38:09 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
CONFIG = ./config.nix
|
2021-08-08 13:57:45 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
entrypoint:
|
2021-08-31 03:38:09 +00:00
|
|
|
nix-build -A entrypoint \
|
2022-05-08 22:36:28 +00:00
|
|
|
--arg baseConfig '(import ${CONFIG})'
|
2021-08-31 03:38:09 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
install:
|
2022-05-14 21:21:52 +00:00
|
|
|
$$(nix-build -A install --arg baseConfig '(import ${CONFIG})')
|
2021-08-08 13:57:45 +00:00
|
|
|
|
2022-05-08 22:36:28 +00:00
|
|
|
test:
|
2022-05-14 21:21:52 +00:00
|
|
|
$$(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"
|
|
|
|
|
|
|
|
srv.dev-shell:
|
|
|
|
$$(nix-build --no-out-link -A pkgs.bash)/bin/bash srv-dev-env.sh \
|
2022-05-15 02:42:43 +00:00
|
|
|
--command " \
|
|
|
|
cd srv/src; \
|
|
|
|
go run cmd/import-posts/main.go ../../static/src/_posts/*; \
|
|
|
|
return; \
|
|
|
|
"
|
2021-08-08 13:57:45 +00:00
|
|
|
|
|
|
|
srv.shell:
|
2022-05-14 21:21:52 +00:00
|
|
|
nix-shell -A srv.shellWithBuild --arg baseConfig '(import ${CONFIG})' \
|
|
|
|
--command 'cd srv/src; return'
|