makefile creates documentation and serves it thanks to darkhttpd.

master
Philippe Pittoli 2023-06-14 18:38:31 +02:00
parent 538faf5004
commit a441431e05
1 changed files with 16 additions and 6 deletions

View File

@ -1,5 +1,4 @@
all: build all: build
build: build:
shards build shards build
@ -15,6 +14,17 @@ setup:
run-authd: setup run-authd: setup
./bin/authd -k /tmp/PASSWORD -R -E --storage $(DATA_DIRECTORY) ./bin/authd -k /tmp/PASSWORD -R -E --storage $(DATA_DIRECTORY)
doc:
crystal docs
HTTPD_ACCESS_LOGS ?= /tmp/access-authd-docs.log
HTTPD_ADDR ?= 127.0.0.1
HTTPD_PORT ?= 9000
DIR ?= docs
serve-doc:
darkhttpd $(DIR) --addr $(HTTPD_ADDR) --port $(HTTPD_PORT) --log $(HTTPD_ACCESS_LOGS)
# First user always is the admin. # First user always is the admin.
add-first-user: add-first-user:
./bin/authc bootstrap $(NAME) $(EMAIL) ./bin/authc bootstrap $(NAME) $(EMAIL)
@ -31,11 +41,11 @@ print-message-numbers:
print-messages-without-comments: print-messages-without-comments:
make -s print-messages | grep -vE '^[[:blank:]]+#' make -s print-messages | grep -vE '^[[:blank:]]+#'
print-error-messages: print-response-messages:
cat src/responses/*.cr | ./bin/get-messages.awk cat src/responses/*.cr | ./bin/get-messages.awk
print-error-message-numbers: print-response-message-numbers:
make -s print-error-messages | grep -E "^[0-9]" | sort -n make -s print-response-messages | grep -E "^[0-9]" | sort -n
print-error-messages-without-comments: print-response-messages-without-comments:
make -s print-error-messages | grep -vE '^[[:blank:]]+#' make -s print-response-messages | grep -vE '^[[:blank:]]+#'