-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (43 loc) · 2.69 KB
/
Copy pathMakefile
File metadata and controls
57 lines (43 loc) · 2.69 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
.DEFAULT_GOAL := help
.PHONY: clean package package-deps package-source package-upload package-wheel tar-source upgrade
tar-source: package-deps ## Package repository as tar for easy distribution
rm -rf tar-src/
mkdir tar-src/
git-archive-all --prefix template/ tar-src/orcfax-validator-node.tar.gz
package-deps: ## Upgrade dependencies for packaging
python3 -m pip install -U twine wheel build git-archive-all
package-source: package-deps clean ## Package the source code
python -m build .
package-check: clean package-source ## Check the distribution is valid
twine check dist/*
package-upload-test: clean package-deps package-check ## Upload package to test.pypi
twine upload dist/* --repository-url https://test.pypi.org/legacy/ --verbose
package-upload: clean package-deps package-check ## Upload package to pypi
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ --verbose
clean: ## Clean the package directory
rm -rf src/*.egg-info/
rm -rf build/
rm -rf dist/
rm -rf tar-src/
hide-config: ## Hide dev personalized config
git update-index --assume-unchanged "validator.env"
git update-index --assume-unchanged "src/validator_node_api/validator_node.py"
git update-index --assume-unchanged "certs/cert.cfg"
git update-index --assume-unchanged "send_validation_request.py"
git update-index --assume-unchanged "wait_for_validator_messages.py"
git update-index --assume-unchanged "fetch_and_store.py"
show-config: ## Show dev personalized config
git update-index --no-assume-unchanged "validator.env"
git update-index --no-assume-unchanged "src/validator_node_api/validator_node.py"
git update-index --no-assume-unchanged "certs/cert.cfg"
git update-index --no-assume-unchanged "send_validation_request.py"
git update-index --no-assume-unchanged "wait_for_validator_messages.py"
git update-index --no-assume-unchanged "fetch_and_store.py"
list-hidden: ## List dev personalized config
git ls-files -v | grep ^[h]
upgrade: ## Upgrade project dependencies.
pip-upgrade
pre-commit-checks: ## Run pre-commit-checks.
pre-commit run --all-files
help: ## Print this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'