feat: adding a Makefile at the root.

This commit is contained in:
damien DELPY 2024-11-25 21:27:16 +01:00
parent 935d3812f7
commit 5815ab2a22
No known key found for this signature in database
4 changed files with 23 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
dev-db/
database/
**/.env
PostgreSQL/build/*
*.data

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
DIR_SQL = PostgreSQL
DIR_BACK = back-end
BIN = prepare_dev
all: $(BIN)
prepare_dev:
cp $(DIR_BACK)/.env.example $(DIR_BACK)/.env
clean:
rm -f $(DIR_BACK)/.env
cd $(DIR_SQL) && make clean

View File

@ -1,5 +1,5 @@
DIR_SRC=src
DIR_BUILD=build
DIR_SRC = src
DIR_BUILD = build
BIN = 00_drop.sql 01_create.sql 02_insert.sql \
03_select.sql 04_update.sql

View File

@ -9,18 +9,18 @@ On aime les briques
## Generating data
To use the script `generate_data.py`, do :
1) `cd PostgreSQL/`
2) `rm -fr build/*` (don't remove the directory, just the files in it.)
3) `python generate_data.py`
```
cd PostgreSQL/
make generate_data
```
## Dev
To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run :
```
cp back-end/.env.example back-end/.env
cd free-briques/
make
docker compose -f docker-compose.dev.yml up
```