@@ -125,6 +125,7 @@ check-env:
125
125
# help: serve-ssl - Run Gunicorn behind HTTPS on :4444 (uses ./certs)
126
126
# help: dev - Run fast-reload dev server (uvicorn)
127
127
# help: run - Execute helper script ./run.sh
128
+ # help: smoketest - Run smoketest.py --verbose (build container, add MCP server, test endpoints)
128
129
# help: test - Run unit tests with pytest
129
130
# help: test-curl - Smoke-test API endpoints with curl script
130
131
# help: pytest-examples - Run README / examples through pytest-examples
@@ -159,6 +160,11 @@ certs: ## Generate ./certs/cert.pem & ./certs/key.pem
159
160
chmod 640 certs/key.pem
160
161
161
162
# # --- Testing -----------------------------------------------------------------
163
+ smoketest :
164
+ @echo " 🚀 Running smoketest…"
165
+ @./smoketest.py --verbose || { echo " ❌ Smoketest failed!" ; exit 1; }
166
+ @echo " ✅ Smoketest passed!"
167
+
162
168
test :
163
169
@echo " 🧪 Running tests..."
164
170
@test -d " $( VENV_DIR) " || make venv
@@ -774,33 +780,46 @@ containerfile-update:
774
780
# help: verify - Build + twine + check-manifest + pyroma (no upload)
775
781
# help: publish - Verify, then upload to PyPI (needs TWINE_* creds)
776
782
# =============================================================================
777
- .PHONY : dist wheel sdist verify publish
778
-
779
- dist : clean # # Build wheel + sdist
780
- python3 -m build
781
- @echo " 🛠 Wheel & sdist written to ./dist"
782
-
783
- wheel : # # Build wheel only
784
- python3 -m build -w
785
- @echo " 🛠 Wheel written to ./dist"
786
-
787
- sdist : # # Build source distribution only
788
- python3 -m build -s
789
- @echo " 🛠 Source distribution written to ./dist"
783
+ .PHONY : dist wheel sdist verify publish publish-testpypi
784
+
785
+ dist : clean # # Build wheel + sdist into ./dist
786
+ @test -d " $( VENV_DIR) " || $(MAKE ) --no-print-directory venv
787
+ @/bin/bash -eu -c " \
788
+ source $(VENV_DIR ) /bin/activate && \
789
+ python3 -m pip install --quiet --upgrade pip build && \
790
+ python3 -m build"
791
+ @echo ' 🛠 Wheel & sdist written to ./dist'
792
+
793
+ wheel : # # Build wheel only
794
+ @test -d " $( VENV_DIR) " || $(MAKE ) --no-print-directory venv
795
+ @/bin/bash -eu -c " \
796
+ source $(VENV_DIR ) /bin/activate && \
797
+ python3 -m pip install --quiet --upgrade pip build && \
798
+ python3 -m build -w"
799
+ @echo ' 🛠 Wheel written to ./dist'
800
+
801
+ sdist : # # Build source distribution only
802
+ @test -d " $( VENV_DIR) " || $(MAKE ) --no-print-directory venv
803
+ @/bin/bash -eu -c " \
804
+ source $(VENV_DIR ) /bin/activate && \
805
+ python3 -m pip install --quiet --upgrade pip build && \
806
+ python3 -m build -s"
807
+ @echo ' 🛠 Source distribution written to ./dist'
790
808
791
809
verify : dist # # Build, run metadata & manifest checks
792
- twine check dist/* # metadata sanity
793
- check-manifest # sdist completeness
794
- pyroma -d . # metadata quality score
810
+ @/bin/bash -c " source $( VENV_DIR) /bin/activate && \
811
+ twine check dist/* && \
812
+ check-manifest && \
813
+ pyroma -d ."
795
814
@echo " ✅ Package verified – ready to publish."
796
815
797
816
publish : verify # # Verify, then upload to PyPI
798
- twine upload dist/ * # creds via env vars or ~/.pypirc
817
+ @/bin/bash -c " source $( VENV_DIR ) /bin/activate && twine upload dist/* "
799
818
@echo " 🚀 Upload finished – check https://pypi.org/project/$( PROJECT_NAME) /"
800
819
801
- publish-testpypi : verify # # Verify, then upload to TestPyPI
802
- twine upload --repository testpypi dist/* # creds via env vars or ~/.pypirc
803
- @echo " 🚀 Upload finished – check https://pypi.org/project/$( PROJECT_NAME) /"
820
+ publish-testpypi : verify # # Verify, then upload to TestPyPI
821
+ @/bin/bash -c " source $( VENV_DIR ) /bin/activate && twine upload --repository testpypi dist/*"
822
+ @echo " 🚀 Upload finished – check https://test. pypi.org/project/$( PROJECT_NAME) /"
804
823
805
824
# =============================================================================
806
825
# 🦭 PODMAN CONTAINER BUILD & RUN
@@ -1620,7 +1639,7 @@ local-pypi-debug:
1620
1639
# help: devpi-clean - Full cycle: build → upload → install locally
1621
1640
# help: devpi-status - Show devpi server status
1622
1641
# help: devpi-web - Open devpi web interface
1623
- # help: devpi-delete - Delete mcpgateway ==<ver> from devpi index
1642
+ # help: devpi-delete - Delete mcp-contextforge-gateway ==<ver> from devpi index
1624
1643
1625
1644
1626
1645
.PHONY : devpi-install devpi-init devpi-start devpi-stop devpi-setup-user devpi-upload \
@@ -1738,21 +1757,21 @@ devpi-upload: dist devpi-setup-user ## Build wheel/sdist, then upload
1738
1757
@echo " 🌐 Browse packages: $( DEVPI_URL) /$( DEVPI_INDEX) "
1739
1758
1740
1759
devpi-test :
1741
- @echo " 📥 Installing package from devpi..."
1760
+ @echo " 📥 Installing package mcp-contextforge-gateway from devpi..."
1742
1761
@if ! curl -s $(DEVPI_URL ) > /dev/null 2>&1 ; then \
1743
1762
echo " ❌ DevPi server not running. Run 'make devpi-start' first." ; \
1744
1763
exit 1; \
1745
1764
fi
1746
1765
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
1747
1766
pip install --index-url $(DEVPI_URL ) /$(DEVPI_INDEX ) /+simple/ \
1748
1767
--extra-index-url https://pypi.org/simple/ \
1749
- --force-reinstall $( PROJECT_NAME ) "
1750
- @echo " ✅ Installed $( PROJECT_NAME ) from devpi"
1768
+ --force-reinstall mcp-contextforge-gateway "
1769
+ @echo " ✅ Installed mcp-contextforge-gateway from devpi"
1751
1770
1752
1771
devpi-clean : clean dist devpi-upload devpi-test
1753
1772
@echo " 🎉 Full devpi cycle complete!"
1754
1773
@echo " 📊 Package info:"
1755
- @/bin/bash -c " source $( VENV_DIR) /bin/activate && pip show $( PROJECT_NAME ) "
1774
+ @/bin/bash -c " source $( VENV_DIR) /bin/activate && pip show mcp-contextforge-gateway "
1756
1775
1757
1776
devpi-status :
1758
1777
@echo " 🔍 DevPi server status:"
@@ -1848,11 +1867,11 @@ VER ?= $(shell python -c "import tomllib, pathlib; \
1848
1867
print(tomllib.loads(pathlib.Path('pyproject.toml') .read_text())['project']['version'])" \
1849
1868
2>/dev/null || echo 0.0.0)
1850
1869
1851
- devpi-delete : devpi-setup-user # # Delete mcpgateway ==$(VER) from index
1852
- @echo " 🗑️ Removing mcpgateway ==$( VER) from $( DEVPI_INDEX) …"
1870
+ devpi-delete : devpi-setup-user # # Delete mcp-contextforge-gateway ==$(VER) from index
1871
+ @echo " 🗑️ Removing mcp-contextforge-gateway ==$( VER) from $( DEVPI_INDEX) …"
1853
1872
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
1854
1873
devpi use $(DEVPI_INDEX ) && \
1855
- devpi remove -y mcpgateway ==$(VER ) || true"
1874
+ devpi remove -y mcp-contextforge-gateway ==$(VER ) || true"
1856
1875
@echo " ✅ Delete complete (if it existed)"
1857
1876
1858
1877
0 commit comments