|
|
|
SHELL := /bin/bash |
|
|
|
|
|
COLOR_RESET=\033[0m |
|
COLOR_CYAN=\033[1;36m |
|
COLOR_GREEN=\033[1;32m |
|
|
|
|
|
.PHONY: help install run |
|
|
|
|
|
.DEFAULT_GOAL := help |
|
|
|
|
|
.SILENT: |
|
|
|
|
|
name := $(word 2,$(MAKECMDGOALS)) |
|
|
|
|
|
help: |
|
@echo "Please use 'make <target>' where <target> is one of the following:" |
|
@echo " help Return this message with usage instructions." |
|
@echo " install Will install the dependencies using Poetry." |
|
@echo " run <folder_name> Runs GPT Engineer on the folder with the given name." |
|
|
|
|
|
install: poetry-install install-pre-commit farewell |
|
|
|
|
|
poetry-install: |
|
@echo -e "$(COLOR_CYAN)Installing project with Poetry...$(COLOR_RESET)" && \ |
|
poetry install |
|
|
|
|
|
install-pre-commit: |
|
@echo -e "$(COLOR_CYAN)Installing pre-commit hooks...$(COLOR_RESET)" && \ |
|
poetry run pre-commit install |
|
|
|
|
|
farewell: |
|
@echo -e "$(COLOR_GREEN)All done!$(COLOR_RESET)" |
|
|
|
|
|
run: |
|
@echo -e "$(COLOR_CYAN)Running GPT Engineer on $(COLOR_GREEN)$(name)$(COLOR_CYAN) folder...$(COLOR_RESET)" && \ |
|
poetry run gpt-engineer projects/$(name) |
|
|
|
|
|
cloc: |
|
cloc . --exclude-dir=node_modules,dist,build,.mypy_cache,benchmark --exclude-list-file=.gitignore --fullpath --not-match-d='docs/_build' --by-file |
|
|