-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (66 loc) · 1.73 KB
/
Makefile
File metadata and controls
80 lines (66 loc) · 1.73 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Makefile
HOOKS_DIR = .git/hooks
.PHONY: clean
clean: clean-build clean-pyc clean-test clean-docs
.PHONY: clean-build
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
rm -fr deployments/build/
rm -fr deployments/Dockerfiles/open_aea/packages
rm -fr pip-wheel-metadata
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -fr {} +
find . -name '*.svn' -exec rm -fr {} +
find . -name '*.db' -exec rm -fr {} +
rm -fr .idea .history
rm -fr venv
.PHONY: clean-docs
clean-docs:
rm -fr site/
.PHONY: clean-pyc
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
.PHONY: clean-test
clean-test:
rm -fr .tox/
rm -f .coverage
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;
rm -fr coverage.xml
rm -fr htmlcov/
rm -fr .hypothesis
rm -fr .pytest_cache
rm -fr .mypy_cache/
find . -name 'log.txt' -exec rm -fr {} +
find . -name 'log.*.txt' -exec rm -fr {} +
.PHONY: hashes
hashes: clean
poetry run autonomy packages lock
poetry run autonomy push-all
lint:
poetry run adev -v -n 0 lint
fmt:
poetry run adev -n 0 fmt
test:
poetry run adev -v test
install:
@echo "Setting up Git hooks..."
# Create symlinks for pre-commit and pre-push hooks
cp scripts/pre_commit_hook.sh $(HOOKS_DIR)/pre-commit
cp scripts/pre_push_hook.sh $(HOOKS_DIR)/pre-push
chmod +x $(HOOKS_DIR)/pre-commit
chmod +x $(HOOKS_DIR)/pre-push
@echo "Git hooks have been installed."
@echo "Installing dependencies..."
bash install.sh
@echo "Dependencies installed."
@echo "Syncing packages..."
poetry run autonomy packages sync
@echo "Packages synced."
sync:
git pull
poetry run autonomy packages sync
all: fmt lint test hashes