mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-08-03 11:07:00 -04:00
39 lines
1.0 KiB
Makefile
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
|