diff --git a/README.md b/README.md index aefbd53c0b..0d89acd0d8 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Official integrations are maintained by companies building production ready MCP - Cartesia logo **[Cartesia](https://github.com/cartesia-ai/cartesia-mcp)** - Connect to the [Cartesia](https://cartesia.ai/) voice platform to perform text-to-speech, voice cloning etc. - Cashfree logo **[Cashfree](https://github.com/cashfree/cashfree-mcp)** - [Cashfree Payments](https://www.cashfree.com/) official MCP server. - **[CB Insights](https://github.com/cbinsights/cbi-mcp-server)** - Use the [CB Insights](https://www.cbinsights.com) MCP Server to connect to [ChatCBI](https://www.cbinsights.com/chatcbi/) -- ChainAware.ai Logo **[Behavioural Prediction](https://github.com/ChainAware/behavioral-prediction-mcp)** - AI-powered tools to analyze wallet behaviour prediction,fraud detection and rug pull prediction powered by [ChainAware.ai](https://www.chainaware.ai). +- ChainAware.ai Logo **[Behavioural Prediction](https://github.com/ChainAware/behavioral-prediction-mcp)** - AI-powered tools to analyze wallet behaviour prediction, fraud detection and rug pull prediction powered by [ChainAware.ai](https://www.chainaware.ai). - Chargebee Logo **[Chargebee](https://github.com/chargebee/agentkit/tree/main/modelcontextprotocol)** - MCP Server that connects AI agents to [Chargebee platform](https://www.chargebee.com). - Cheqd Logo **[Cheqd](https://github.com/cheqd/mcp-toolkit)** - Enable AI Agents to be trusted, verified, prevent fraud, protect your reputation, and more through [cheqd's](https://cheqd.io) Trust Registries and Credentials. - Chiki StudIO Logo **[Chiki StudIO](https://chiki.studio/galimybes/mcp/)** - Create your own configurable MCP servers purely via configuration (no code), with instructions, prompts, and tools support. diff --git a/scripts/release.py b/scripts/release.py index e4ce1274c3..7a7f4b0131 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -112,9 +112,7 @@ def has_changes(path: Path, git_hash: GitHash) -> bool: text=True, ) - changed_files = [Path(f) for f in output.stdout.splitlines()] - relevant_files = [f for f in changed_files if f.suffix in [".py", ".ts"]] - return len(relevant_files) >= 1 + return any(line.strip() for line in output.stdout.splitlines()) except subprocess.CalledProcessError: return False diff --git a/tests/test_release.py b/tests/test_release.py new file mode 100644 index 0000000000..07b728cc8a --- /dev/null +++ b/tests/test_release.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +import importlib.util +import subprocess +import sys +import types +from pathlib import Path + + +sys.modules.setdefault("tomlkit", types.SimpleNamespace(parse=None, dumps=None)) + +spec = importlib.util.spec_from_file_location("release_script", Path("scripts/release.py")) +release = importlib.util.module_from_spec(spec) +assert spec.loader is not None +spec.loader.exec_module(release) + + +def git(*args: str, cwd: Path) -> str: + result = subprocess.run( + ["git", *args], + cwd=cwd, + check=True, + capture_output=True, + text=True, + ) + return result.stdout.strip() + + +def test_has_changes_treats_lockfile_updates_as_relevant(tmp_path: Path) -> None: + repo = tmp_path / "repo" + pkg = repo / "src" / "git" + pkg.mkdir(parents=True) + + git("init", cwd=repo) + git("config", "user.name", "Test User", cwd=repo) + git("config", "user.email", "test@example.com", cwd=repo) + + (pkg / "pyproject.toml").write_text( + '[project]\nname = "mcp-server-git"\nversion = "2026.1.14"\n' + ) + (pkg / "uv.lock").write_text("version = 1\n") + + git("add", ".", cwd=repo) + git("commit", "-m", "initial", cwd=repo) + base = git("rev-parse", "HEAD", cwd=repo) + + (pkg / "uv.lock").write_text("version = 2\n") + + assert release.has_changes(pkg, release.GitHash(base)) is True