-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 939 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 939 Bytes
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
include .env
export $(shell sed 's/=.*//' .env)
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
ifeq (env,$(firstword $(MAKECMDGOALS)))
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
endif
with-env:
> $(RUN_ARGS)
migration-up:
> refinery migrate -e DATABASE_URI -p ./migrations
start-backend:
> cd packages/backend && \
> node .
build-backend:
> cd packages/backend && \
> pnpm tsup --clean ./src/main.ts
dev-backend:
> pnpm nodemon -w ./packages/backend/src -e 'ts' -x 'make build-backend && (make start-backend | pino-pretty)'
install-node-deps:
> pnpm i
install-rust-deps:
> cargo install refinery_cli --no-default-features -F postgresql
fresh-install: install-node-deps install-rust-deps
.PHONY: with-env migration-up start-backend build-backend dev-backend fresh-install