authd/makefile

42 lines
923 B
Makefile

all: build
build:
shards build
NAME ?= John
EMAIL ?= john@example.com
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)
# First user always is the admin.
add-first-user:
./bin/authc bootstrap $(NAME) $(EMAIL)
add-user:
./bin/authc user add $(NAME) $(EMAIL)
print-messages:
cat src/requests/*.cr | ./bin/get-messages.awk
print-message-numbers:
make -s print-messages | grep -E "^[0-9]" | sort -n
print-messages-without-comments:
make -s print-messages | grep -vE '^[[:blank:]]+#'
print-error-messages:
cat src/responses/*.cr | ./bin/get-messages.awk
print-error-message-numbers:
make -s print-error-messages | grep -E "^[0-9]" | sort -n
print-error-messages-without-comments:
make -s print-error-messages | grep -vE '^[[:blank:]]+#'