-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 847 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 847 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
.PHONY: setup run clean help
VENV_NAME=mydigest
VENV_BIN = $(VENV_NAME)/bin
PYTHON_VERSION=python3
# Determine OS and adjust paths
ifeq ($(OS),Windows_NT)
VENV_BIN = $(VENV_NAME)/Scripts
PYTHON_VERSION = python
endif
setup:
@echo "Creating environment ..."
$(PYTHON_VERSION) -m venv $(VENV_NAME)
@echo "Installing requirements ..."
$(VENV_BIN)/pip install -r requirements.txt
run:
@echo "Running bot ..."
$(VENV_BIN)/python -m src.bot
clean:
ifeq ($(OS),Windows_NT)
@echo "Removing environment (Windows)..."
rmdir /s /q $(VENV_NAME)
else
@echo "Removing environment (macOS/Linux)..."
rm -rf $(VENV_NAME)
endif
help:
@echo "Available commands:"
@echo " make setup : Setup project (create environment and install requirements)"
@echo " make run : Run the mydigest bot"
@echo " make clean : Remove environment"