PronounsPage/Makefile
2025-04-18 12:08:27 +02:00

39 lines
1.0 KiB
Makefile

-include .env.dist
-include .env
KEYS_DIR=./keys
# make targets phony because some commands match with a directory
.PHONY: install test run start stop deploy switch migrate
install:
-cp -n .env.dist .env
if [ ! -d "${KEYS_DIR}" ]; then mkdir -p ${KEYS_DIR}; openssl genrsa -out ${KEYS_DIR}/private.pem 2048; openssl rsa -in ${KEYS_DIR}/private.pem -outform PEM -pubout -out ${KEYS_DIR}/public.pem; fi
mkdir -p moderation
touch moderation/sus.txt moderation/rules-users.md moderation/rules-terminology.md moderation/rules-sources.md moderation/timesheets.md moderation/expenses.md moderation/blog.md
pnpm install
pnpm prepare-dev
pnpm run-file server/migrate.ts
lint:
pnpm lint
test:
pnpm test
run:
pnpm dev
build: install
pnpm build
pnpm run-file server/sentry.ts release
deploy:
pnpm install -P
pnpm run-file server/migrate.ts
-redis-cli --scan --pattern "${NUXT_PUBLIC_ENV}:cache:*" | xargs --delimiter "\n" redis-cli DEL
-pnpm run-file server/sentry.ts deploy
migrate:
pnpm run-file server/migrate.ts