authd/makefile

52 lines
1.2 KiB
Makefile
Raw Normal View History

2023-05-29 20:41:12 +02:00
all: build
build:
shards build
NAME ?= John
EMAIL ?= john@example.com
2023-06-08 17:33:43 +02:00
PASSWORD_FILE ?= /tmp/PASSWORD
DATA_DIRECTORY ?= /tmp/DATA-AUTHD
setup:
@[ -f $(PASSWORD_FILE) ] || echo -n "coucou" > $(PASSWORD_FILE)
run-authd: setup
./bin/authd -k /tmp/PASSWORD -R -E --storage $(DATA_DIRECTORY)
2023-05-29 20:41:12 +02:00
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.
add-first-user:
./bin/authc bootstrap $(NAME) $(EMAIL)
2023-05-29 20:41:12 +02:00
add-user:
./bin/authc user add $(NAME) $(EMAIL)
2023-06-12 20:54:41 +02:00
print-messages:
cat src/requests/*.cr | ./bin/get-messages.awk
2023-06-13 03:16:59 +02:00
print-message-numbers:
2023-06-14 01:47:40 +02:00
make -s print-messages | grep -E "^[0-9]" | sort -n
print-messages-without-comments:
2023-06-14 01:47:40 +02:00
make -s print-messages | grep -vE '^[[:blank:]]+#'
print-response-messages:
2023-06-14 01:47:40 +02:00
cat src/responses/*.cr | ./bin/get-messages.awk
print-response-message-numbers:
make -s print-response-messages | grep -E "^[0-9]" | sort -n
2023-06-14 01:47:40 +02:00
print-response-messages-without-comments:
make -s print-response-messages | grep -vE '^[[:blank:]]+#'