-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGNUmakefile
More file actions
41 lines (29 loc) · 1.08 KB
/
GNUmakefile
File metadata and controls
41 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.PHONY: db-migrate db-push deploy generate install lint run-engineering run-engineering-cron test
prisma/schema.dev.prisma: prisma/schema.prisma
sed -e 's/provider = "mysql"/provider = "sqlite"/' -e 's/ *@db\.[A-Za-z]*//g' $< > $@
ansible/lib/ansible_mitogen:
pip install --target=ansible/lib mitogen
deploy: node_modules ansible/lib/ansible_mitogen
npm run build
$(MAKE) --no-print-directory -C ../bsmiweb-credentials decrypt > .env.deploy.tmp
ansible-playbook -i ansible/inventory.ini ansible/deploy.yml -e dotenv_file=.env.deploy.tmp
rm -f .env.deploy.tmp
db-migrate: node_modules
NODE_ENV=production npx prisma migrate dev
npx prisma generate
db-push: node_modules prisma/schema.dev.prisma
npx prisma db push
node_modules: package.json package-lock.json
npm install
touch node_modules
install: node_modules
generate: node_modules prisma/schema.dev.prisma
npx prisma generate --schema=prisma/schema.dev.prisma
lint: node_modules
npm run lint
run-engineering: db-push
node --watch src/index.js
run-engineering-cron: db-push
node --watch src/cron.js
test: generate
npm test