@@ -25,27 +25,18 @@ install: ## Install the project in dev mode.
2525 .venv/bin/pip install -U wheel setuptools cython pip mypy sqlfluff && .venv/bin/pip install -U -r requirements.txt -r requirements-docs.txt
2626 @echo " => Build environment installed successfully. ** If you want to re-install or update, 'make install'"
2727
28- .PHONY : clean
29- clean : clean-sqlscripts # # remove all build, testing, and static documentation files
30- rm -fr build/
31- rm -fr dist/
32- rm -fr .eggs/
33- find . -name ' *.egg-info' -exec rm -fr {} +
34- find . -name ' *.egg' -exec rm -f {} +
35- find . -name ' *.pyc' -exec rm -f {} +
36- find . -name ' *.pyo' -exec rm -f {} +
37- find . -name ' *~' -exec rm -f {} +
38- find . -name ' __pycache__' -exec rm -fr {} +
39- find . -name ' .ipynb_checkpoints' -exec rm -fr {} +
40- rm -fr .tox/
41- rm -fr .coverage
42- rm -fr coverage.xml
43- rm -fr coverage.json
44- rm -fr htmlcov/
45- rm -fr .pytest_cache
46- rm -fr .mypy_cache
47- rm -fr site
48- @echo " => Source cleaned successfully"
28+ .PHONY : clean
29+ clean : # # Cleanup temporary build artifacts
30+ @echo " ${INFO} Cleaning working directory... 🧹"
31+ @rm -rf .pytest_cache .ruff_cache .hypothesis build/ dist/ .eggs/ .coverage coverage.xml coverage.json htmlcov/ .pytest_cache tests/.pytest_cache tests/** /.pytest_cache .mypy_cache .unasyncd_cache/ .auto_pytabs_cache node_modules > /dev/null 2>&1
32+ @find . -name ' *.egg-info' -exec rm -rf {} + > /dev/null 2>&1
33+ @find . -type f -name ' *.egg' -exec rm -f {} + > /dev/null 2>&1
34+ @find . -name ' *.pyc' -exec rm -f {} + > /dev/null 2>&1
35+ @find . -name ' *.pyo' -exec rm -f {} + > /dev/null 2>&1
36+ @find . -name ' *~' -exec rm -f {} + > /dev/null 2>&1
37+ @find . -name ' __pycache__' -exec rm -rf {} + > /dev/null 2>&1
38+ @find . -name ' .ipynb_checkpoints' -exec rm -rf {} + > /dev/null 2>&1
39+ @echo " ${OK} Working directory cleaned"
4940
5041.PHONY : clean-sqlscripts
5142clean-sqlscripts :
@@ -59,25 +50,25 @@ build-sqlscripts: clean-sqlscripts ## Build the collector SQL scripts.
5950 @echo " => Building SQL Helper Scripts for Oracle version $( VERSION) ..."
6051 python3 -c " import m2r; python_text = m2r.convert(open('oracle/README.md').read()); f = open('oracle/README.txt', 'w'); f.write(python_text); f.close()"
6152 @mkdir -p $(BUILD_DIR ) /oracle
62- @cp oracle/* .sql $(BUILD_DIR ) /sqlscripts /oracle
63- @cp LICENSE $(BUILD_DIR ) /sqlscripts/ oracle
64- echo " SQL Helper Scripts for Oracle Database version $( VERSION) ($( COMMIT_SHA) )" > $(BUILD_DIR ) /sqlscripts/ oracle/VERSION.txt
53+ @cp ./ oracle/* .sql $(BUILD_DIR ) /oracle
54+ @cp LICENSE $(BUILD_DIR ) /oracle
55+ echo " SQL Helper Scripts for Oracle Database version $( VERSION) ($( COMMIT_SHA) )" > $(BUILD_DIR ) /oracle/VERSION.txt
6556
6657 @echo " => Building SQL Helper Scripts for Microsoft SQL Server version $( VERSION) ..."
6758 python3 -c " import m2r; python_text = m2r.convert(open('mssql/README.md').read()); f = open('mssql/README.txt', 'w'); f.write(python_text); f.close()"
68- @mkdir -p $(BUILD_DIR ) /sqlscripts/ sqlserver
69- @cp mssql/* .sql $(BUILD_DIR ) /sqlscripts/ sqlserver
70- @cp mssql/README.txt $(BUILD_DIR ) /sqlscripts/ sqlserver
71- @cp LICENSE $(BUILD_DIR ) /sqlscripts/ sqlserver
72- @echo " SQL Helper Scripts for Microsoft SQL Server version $( VERSION) ($( COMMIT_SHA) )" > $(BUILD_DIR ) /sqlscripts/ sqlserver/VERSION.txt
59+ @mkdir -p $(BUILD_DIR ) /sqlserver
60+ @cp mssql/* .sql $(BUILD_DIR ) /sqlserver
61+ @cp mssql/README.txt $(BUILD_DIR ) /sqlserver
62+ @cp LICENSE $(BUILD_DIR ) /sqlserver
63+ @echo " SQL Helper Scripts for Microsoft SQL Server version $( VERSION) ($( COMMIT_SHA) )" > $(BUILD_DIR ) /sqlserver/VERSION.txt
7364
7465 @echo "=> Building SQL Helper Scripts for Postgresql version $(VERSION)..."
7566 python3 -c "import m2r; python_text = m2r.convert(open('postgres/README.md').read()); f = open('postgres/README.txt', 'w'); f.write(python_text); f.close()"
76- @mkdir -p $(BUILD_DIR)/sqlscripts/ postgres
77- @cp postgres/*.sql $(BUILD_DIR)/sqlscripts/ postgres
78- @cp postgres/README.txt $(BUILD_DIR)/sqlscripts/ postgres
79- @cp LICENSE $(BUILD_DIR)/sqlscripts/ postgres
80- @echo "SQL Helper Scripts for Postgres version $(VERSION) ($(COMMIT_SHA))" > $(BUILD_DIR)/sqlscripts/ postgres/VERSION.txt
67+ @mkdir -p $(BUILD_DIR)/postgres
68+ @cp postgres/*.sql $(BUILD_DIR)/postgres
69+ @cp postgres/README.txt $(BUILD_DIR)/postgres
70+ @cp LICENSE $(BUILD_DIR)/postgres
71+ @echo "SQL Helper Scripts for Postgres version $(VERSION) ($(COMMIT_SHA))" > $(BUILD_DIR)/postgres/VERSION.txt
8172
8273 @make package-sqlscripts
8374
@@ -87,16 +78,16 @@ package-sqlscripts:
8778 @rm -f ./$(BUILD_DIR ) /$(COLLECTOR_PACKAGE ) * .zip
8879
8980 @echo "=> Packaging SQL Scripts for Oracle..."
90- @echo "Zipping files in ./$(BUILD_DIR)/sqlscripts/ oracle"
91- @cd $(BASE_DIR)/$(BUILD_DIR)/sqlscripts/ oracle; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-oracle.zip *
81+ @echo "Zipping files in ./$(BUILD_DIR)/oracle"
82+ @cd $(BASE_DIR)/$(BUILD_DIR)/oracle; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-oracle.zip *
9283
9384 @echo "=> Packaging SQL Scripts for Microsoft SQL Server..."
94- @echo "Zipping files in ./$(BUILD_DIR)/sqlscripts/ sqlserver"
95- @cd $(BASE_DIR)/$(BUILD_DIR)/sqlscripts/ sqlserver; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-sqlserver.zip *
85+ @echo "Zipping files in ./$(BUILD_DIR)/sqlserver"
86+ @cd $(BASE_DIR)/$(BUILD_DIR)/sqlserver; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-sqlserver.zip *
9687
9788 @echo "=> Packaging SQL Scripts for Postgres..."
98- @echo "Zipping files in ./$(BUILD_DIR)/sqlscripts/ postgres"
99- @cd $(BASE_DIR)/$(BUILD_DIR)/sqlscripts/ postgres; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-postgres.zip *
89+ @echo "Zipping files in ./$(BUILD_DIR)/postgres"
90+ @cd $(BASE_DIR)/$(BUILD_DIR)/postgres; zip -r $(BASE_DIR)/$(BUILD_DIR)/$(COLLECTOR_PACKAGE)-postgres.zip *
10091
10192.PHONY : build
10293build : build-sqlscripts # # Build and package the collectors
@@ -134,6 +125,6 @@ docs: ## generate HTML documentation and serve it to the browser
134125pre-release : # # bump the version and create the release tag
135126 make gen-docs
136127 make clean
137- ./. venv/bin/bump2version $(increment )
128+ .venv/bin/bump2version $(increment )
138129 head .bumpversion.cfg | grep ^current_version
139- make build
130+ make build
0 commit comments