@@ -25,27 +25,18 @@ install: ## Install the project in dev mode.
25
25
.venv/bin/pip install -U wheel setuptools cython pip mypy sqlfluff && .venv/bin/pip install -U -r requirements.txt -r requirements-docs.txt
26
26
@echo " => Build environment installed successfully. ** If you want to re-install or update, 'make install'"
27
27
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"
49
40
50
41
.PHONY : clean-sqlscripts
51
42
clean-sqlscripts :
@@ -59,25 +50,25 @@ build-sqlscripts: clean-sqlscripts ## Build the collector SQL scripts.
59
50
@echo " => Building SQL Helper Scripts for Oracle version $( VERSION) ..."
60
51
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()"
61
52
@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
65
56
66
57
@echo " => Building SQL Helper Scripts for Microsoft SQL Server version $( VERSION) ..."
67
58
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
73
64
74
65
@echo "=> Building SQL Helper Scripts for Postgresql version $(VERSION)..."
75
66
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
81
72
82
73
@make package-sqlscripts
83
74
@@ -87,16 +78,16 @@ package-sqlscripts:
87
78
@rm -f ./$(BUILD_DIR ) /$(COLLECTOR_PACKAGE ) * .zip
88
79
89
80
@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 *
92
83
93
84
@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 *
96
87
97
88
@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 *
100
91
101
92
.PHONY : build
102
93
build : build-sqlscripts # # Build and package the collectors
@@ -134,6 +125,6 @@ docs: ## generate HTML documentation and serve it to the browser
134
125
pre-release : # # bump the version and create the release tag
135
126
make gen-docs
136
127
make clean
137
- ./. venv/bin/bump2version $(increment )
128
+ .venv/bin/bump2version $(increment )
138
129
head .bumpversion.cfg | grep ^current_version
139
- make build
130
+ make build
0 commit comments