-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
55 lines (46 loc) · 1.38 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# OpenWeightlifting Makefile
# Shortcuts to the most common tools should be implemented here.
# Builds the backend server executable
.PHONY: build_backend
build_backend:
cp -r event_data/ backend/
cd backend && go build -o backend
# Builds the frontend files
.PHONY: build_frontend
build_frontend:
@cd python_tools && pipenv install && pipenv run python3 fe_builder.py
cd frontend && npm install
# Installs the python tools used to update the database
.PHONY: install_tools
install_tools:
echo "Installing python tools"
@cd python_tools && pipenv install
# Runs the python_tools used to update the database
.PHONY: update_db
update_db:
echo "Updating the database"
@cd python_tools && pipenv run python3 backend_cli.py --update all
# Stages and commits locally all the new csv files added to the event_data folder
.PHONY: stage_csv
stage_csv:
echo "Staging csv files"
@git add event_data/\*.csv
@git status --p --short | grep event_data
@git commit -m "Database Update"
.PHONY: check_db
DB ?= ""
check_db:
@cd python_tools && pipenv run python3 check_db.py $(DB)
.PHONY: generate-docs
generate-docs:
echo "Generating docs..."
cd backend && swag init --parseDependency --parseInternal
# Removes build files.
.PHONY: clean
clean:
rm -f backend/backend
rm -rf backend/event_data
# Removes build files plus cached dependencies.
.PHONY: veryclean
veryclean: clean
rm -rf frontend/node_modules